WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: goofy usb install  (Read 6645 times)

Offline amalafrida

  • Newbie
  • *
  • Posts: 6
goofy usb install
« on: November 20, 2010, 04: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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: goofy usb install
« Reply #1 on: November 20, 2010, 05:03:04 AM »
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).

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: goofy usb install
« Reply #2 on: November 20, 2010, 07:15:58 AM »
Add the 'waitusb=10' boot option.
Later you can try reducing it to 5.

Offline amalafrida

  • Newbie
  • *
  • Posts: 6
Re: goofy usb install
« Reply #3 on: November 20, 2010, 08:15:17 AM »
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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: goofy usb install
« Reply #4 on: November 20, 2010, 08:36:07 AM »
With GRUB, boot options go on the kernel line.
Is this GRUB 2?  It sure is not correct for GRUB.
« Last Edit: November 20, 2010, 08:44:41 AM by gerald_clark »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: goofy usb install
« Reply #5 on: November 20, 2010, 11:44:54 AM »
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.
Many people see what is. Some people see what can be, and make a difference.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: goofy usb install
« Reply #6 on: November 20, 2010, 12:05:08 PM »
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!
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: goofy usb install
« Reply #7 on: November 20, 2010, 12:35:47 PM »
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)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline thane

  • Hero Member
  • *****
  • Posts: 688
Re: goofy usb install
« Reply #8 on: November 20, 2010, 01:01:44 PM »
"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

Offline amalafrida

  • Newbie
  • *
  • Posts: 6
Re: goofy usb install
« Reply #9 on: November 20, 2010, 01:58:57 PM »
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.

Offline amalafrida

  • Newbie
  • *
  • Posts: 6
Re: goofy usb install
« Reply #10 on: November 20, 2010, 02:18:06 PM »
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.

Offline thane

  • Hero Member
  • *****
  • Posts: 688
Re: goofy usb install
« Reply #11 on: November 20, 2010, 02:48:50 PM »
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)?

Offline amalafrida

  • Newbie
  • *
  • Posts: 6
Re: goofy usb install
« Reply #12 on: November 20, 2010, 03:32:50 PM »
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.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: goofy usb install
« Reply #13 on: November 20, 2010, 04:00:05 PM »
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).
  • (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 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.
« Last Edit: November 21, 2010, 12:05:41 PM by maro »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: goofy usb install
« Reply #14 on: November 20, 2010, 06:20:02 PM »
  • (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). 
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)