Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: amalafrida on November 20, 2010, 07:51:50 AM
-
Multiple problems. I'll take them up seriatim.
Apparently successful install to USB. Boots fine.
Set TCE Drive to USB (/dev/sdb1)
Connect and download Partimage. Apparently successful. After mounting /dev/sdb1, check directory on /mnt/sdb1 (tce/optional) and, sure enough, partimage.tcz is there.
At CLI attempt to initiate partimage
"sh: partimage: not found"
At Apps Audit place partimage in OnDemand
still no go.
reboot.
Apps Audit now shows no partimage option
TCE drive no longer set.
Nice persistence problem ...
Shouldn't the partition (/dev/sdb1) be mounted on boot? It is not.
Any suggestions?
Thanks in advance.
-
perhaps on reboot the usb drive/stick is no longer sdb, but sda or sdc?
It might be better to use label or uid to reference the usb drive/stick (see wiki for this).
-
Add the 'waitusb=10' boot option.
Later you can try reducing it to 5.
-
mounted liveCD iso
copied all files to USB partition labeled "tinycoreUSB"
which leave me the following items in /boot
isolinux (dir)
bzImage
tinycore.gz
reboot grub
set root=(hd2,1) usbwait=10
linux /boot/bzImage
initrd /boot/tinycore.gz
TC boots just fine
However, /dev/sdb1 is still not mounted; only rootfs, proc, sysfs, devpts, tmpfs.
Manual mount of /dev/sdb1 to /mnt/sdb1 confirms that to be the correct drive
created directory "tce" on tinycoreUSB partition (/mnt/sdb1)
Set TCE Drive to /dev/sdb1
then "download only" partimage.tcz ... confirm "ok"
then "Apps Audit" "OnDemand" --> partimage
CLI attempt "partimage" --> sh: partimage: not found
confirm that partimage.tcz has indeed been downloaded to /mnt/sdb1/tce/optional
CLI --> partimage ... same error
reboot
TCE Drive setting not persist
Now then, should I create an onboot.lst file in order to mount by LABEL as suggested?
Thanks for the help.
-
With GRUB, boot options go on the kernel line.
Is this GRUB 2? It sure is not correct for GRUB.
-
amalafrida
Are you familiar with USB Install? It is simple. I suggest you try it.
Look in the menu or control panel, depending which version you are using.
-
amalafrida
Are you familiar with USB Install? It is simple. I suggest you try it.
Look in the menu or control panel, depending which version you are using.
Caution the entire disk will be wiped clean!
-
set root=(hd2,1) usbwait=10
'usbwait' != 'waitusb'
What is 'set root=(hd2,1)' supposed to do exactly? (I am not familiar with syntax particular to your specific bootloader)
-
"Set TCE Drive to USB (/dev/sdb1)"
FWIW, I'm booting off USB and saving extensions there (no hard drive), and my TCE drive setting is
/mnt/sda1/tce
I assume yours would be /mnt/sdb1/tce, but note that it's under /mnt, not /dev
-
Yes, TCE is saving extensions to /mnt/sdb1/tce/optional
Will change "usbwait" to "waitusb"
bootloader is Grub2 ... config works fine
Headed back now to boot with LiveCD and use USB Install option.
-
Nope, on second thought, I'd prefer to stick with the present effort to install according to directions found at
http://wiki.tinycorelinux.com/tiki-index.php?page=Installing+TC+on+USB
I have followed step 4 quite meticulously and still no luck getting extensions installed. I'd like to sort this out and perhaps add a note to the tutorial.
Any further suggestions?
The curious issue is this: when I boot from LiveCD and request list of "mounts" the mounted CD shows. When I boot from USB no USB partition is mounted ... is this normal? Strikes me as anomalous.
-
It's been a while, but IIRC I did my USB install this way:
With the USB stick plugged in, booted from CD with bootcodes base norestore waitusb=5
Opened a terminal, typed 'usbinstall ' [no quotes] at the command prompt.
I think it requires that you have a root shell, and that you download an extension or two. I used the ext formatting. WARNING: THIS WIPES OUT EVERYTHING ON THE USB STICK.
The install makes the USB stick bootable, installs TC itself, and creates the tce and tce/optional directories.
Once the install completes, you can download extensions via the appbrowser, and they will be saved.
I've never used partimage, Did you try to activate it through the command line, or via the applications or on demand menu (right click on desktop to get this)?
-
Right. Back at it. Copied all the files to USB pendrive.
Boot up pendrive to Grub2 prompt.
set root=(hd0,1) waitusb=10
linux /boot/bzImage
initrd /boot/tinycore.gz
boot ...
Boots magnificently.
Control Panel --> Set TCE Drive to /dev/sdb1 ... confirms ok.
Reboot to confirm that drive setting persists. Confirm.
Download two apps: partimage & vim ... download OK
However, they are not at /mnt/sdb1/tce/optional/
Instead found at /home/tc ????
Nevertheless, CLI sudo partimage or sudo vim yields: sudo: partimage: command not found
What?
a.
-
Instead of suggesting to repeat an installation that has been partially successful I'd like to point out a few things that might help in troubleshooting (with the risk to repeat earlier points made):
- (1) For USB pendrives the 'waitusb=X' boot code is most critical. During the boot process the USB needs to be correctly identified early enough for it to be included in the set of storage devices in which TC searches for the 'tce' directory even when the "guidance" is provided via the 'tce=...' boot code. To safely identify whether this detection has worked or not I'd suggest to use cat /opt/.tce_dir If the value is still '/tmp/tce' (which is the built-in default representing "cloud mode") the 'X' value was not large enough. An appropriate value of 'X' might depend on the host hardware as well as the USB pendrive itself, therefore staring with a high enough value (e.g. 20 sec) and reducing it seems to be a good heuristic.
- (2) Where to place boot codes depends on the boot loader used. IIRC for SYSLINUX/EXTLINUX they go on the 'append' line, for (legacy) GRUB on the 'kernel' line, and for GRUB2 the 'linux' line.
- (3) Using a hardcoded device name (e.g. 'sdb1') in the 'tce=...' boot code is not a good idea (IIRC the FAQ points that out already). Those device names are typically not the same when moving the USB pendrive from system to system. OTOH it is "safe practice" to use 'tce=LABEL=...' or 'tce=UUID=...' instead (see the FAQ (http://www.tinycorelinux.com/faq.html#pendrives)).
- (4) I don't think it's a good idea to use 'root=(hdX,Y)' in the GRUB(2) configuration for TC as it is equally hardware detection depended as 'tce=sdb1'. I believe it would be much safer (again) to use something like 'search --no-floppy --fs-uuid ..... --set-root' instead. I'd suggest to read the GRUB2 manual (http://www.gnu.org/software/grub/manual/grub.html#search) for more details.
- (5) Using 'tce-setdrive' has to be done at most once, BUT it's effect will not last if TC does not detect things at the right time during the boot process, see (1).
- (6) As already pointed out the 'waitusb=X' is a necessity, the 'tce=...' is not mandatory. It is merely there for guidance, e.g. in case multiple 'tce' directories could be found in the root amongst all available storage devices. It also serves a purpose if multiple installations (e.g. TC 2.x and TC 3.x) were used on the same USB pendrive (e.g. '/tinycore/TC2/tce' and '/tinycore/TC3/tce') resulting in multiple choices in the boot loader configuration.
- (7) An "optimisation" of the 'waitusb=X' boot code exists since TC 2.11 (which is also mentioned in the FAQ). It takes the form of 'waitusb=X:LABEL=...' or 'waitusb=X:=UUID=...' and waits for the detection of a device with either 'LABEL=...' or 'UUID=...' up to a maximum time of 'X' seconds. This is IMHO the best of both worlds as one could use a "safe" value for 'X' (e.g. a high value of 20 seconds) with the certainty that no time will be "waisted" after the USB pendrive has been recognised. Well, at least with a minumum "retry" value for the check of 250 msec that is pretty close to "no waistage".
EDIT (1): Correction to point (4), as I mis-read an earlier posting and went off in the "wrong direction".
EDIT (2): Adjustment of a reference in (7) to reflect the changed FAQ.
-
- (1) For USB pendrives the 'waitusb=X' boot code is most critical. During the boot process the USB needs to be correctly identified early enough for it to be included in the set of storage devices in which TC searches for the 'tce' directory even when the "guidance" is provided via the 'tce=...' boot code. To safely identify whether this detection has worked or not I'd suggest to use cat /opt/.tce_dir If the value is still '/tmp/tce' (which is the built-in default representing "cloud mode") the 'X' value was not large enough. An appropriate value of 'X' might depend on the host hardware as well as the USB pendrive itself, therefore staring with a high enough value (e.g. 20 sec) and reducing it seems to be a good heuristic.
Based on personal experience I would suggest a higher initial value than 20, unless one would be very certain that USB 2.0 is in use (depending as well on peripheral device as on USB port used).
Taking as an example a specific hardware/software configuration of mine where mounting a USB disk during boot time was required, necessary sleep when using a USB 2.0 ports cadbus card was 8, while with native USB 1.1 port was 23.
I could imagine certain configurations possibly needing quite more than that (e.g. USB 1.0 ports).
-
(which is still not yet documented in the FAQ).
Documentation oversight corrected :)
-
Yes, that's it. waitusb. Everything is cooking now.
Set it up at 20 and then walked it back to 4 ... at which point TC boot no longer captured pendrive. Set a permanent value of 10 in grub boot entry
Magnificent. Now I'll make an effort to summon the courage to add a note to the wiki.
Thanks very much for the help. I regularly tear down and rebuild my os. For that reason, I need a quick drop back to another os with partimage, so I can do a reinstall. Have been using Sysrescue ... but that boot time is an eternity compared to TinyCore.
Again, muchisimas gracias.