Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: bmarkus on October 14, 2009, 03:39:55 AM

Title: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 03:39:55 AM
Tried to install TC 2.4.1 with usbinstall on a running system. Everything looks OK during the installation, but the stick is not bootable. The only message from the BIOS:

Quote
Boot error

Stick is OK with TC installed with UNetbootin.

Installation:

(http://tc.hasix.org/scrcap/usbinst1.png)

Created partitions:

(http://tc.hasix.org/scrcap/usbinst2.png)
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 09:02:06 AM
Is your usb stick in HDD mode, which means is HDD bit flipped on, using a utility like Lexmark? It looks this to me looking at fdisk report, but then I am surprised Unetbootin handled this optimal setting. For me Unetbootin liked only usb sticks as removeable media.
Title: Re: usbinstall -> unbootable stick
Post by: Lee on October 14, 2009, 09:10:33 AM
Hmmm... Please tell me more about the HDD bit and Lexmark utility...  Just to educate me - I'm not having any troubles with USB sticks.
Title: Re: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 09:11:12 AM
Is your usb stick in HDD mode, which means is HDD bit flipped on, using a utility like Lexmark? It looks this to me looking at fdisk report, but then I am surprised Unetbootin handled this optimal setting. For me Unetbootin liked only usb sticks as removeable media.


Just an ordinary USB stick. No U3, nothing special.
Title: Re: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 09:15:10 AM
Is your usb stick in HDD mode, which means is HDD bit flipped on, using a utility like Lexmark? It looks this to me looking at fdisk report, but then I am surprised Unetbootin handled this optimal setting. For me Unetbootin liked only usb sticks as removeable media.


What do you mean HDD bit?
Title: Re: usbinstall -> unbootable stick
Post by: jls on October 14, 2009, 09:17:13 AM
have u tried h or e instead of z?
Title: Re: usbinstall -> unbootable stick
Post by: roberts on October 14, 2009, 09:20:59 AM
It really depends on bios of machine and its capability. Not all install types will boot. That is why I offer 3 install types and UNetbootin. Between those four hopefully at least one will boot on machines that claim to boot from usb. Typically using option 'z' zip mode the bios will indicate usb boot zip.  FYI, I have found on some machines, you must also enable usb keyboard even if you are not using one. Also it seems the older computers offered zip booting and newer ones perfer HDD or Ext. There is no panacea for USB booting of pendrives. YMMV
Title: Re: usbinstall -> unbootable stick
Post by: 3rail on October 14, 2009, 09:25:42 AM
fwiw, usbinstall has always worked for me if I

1.  use syslinux or extlinux (haven't tried usb zip)
2.  mount a cd copy of TC and use that for my (r)unning system instead of /tmp (as in /mnt/sr0/boot/)

good luck
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 09:37:12 AM
Bmarkus, Lee:
Normally when you buy a usb stick it comes as removeable media. Hardware of the usb stick allows to set this media to be as removeable or look like a hard disk drive. You can use a utility to flip this bit in usb stick firmware, which decides in what mode this usb stick is going to work. One of such utilities is a Lexmark provided utility for their sticks, but it works for many other sticks as well.
When a usb is in HDD mode, then it shows in operating system as hard disk.
It is a huge difference between these modes, as some computers will boot from usb in removeable mode, but not on HDD mode and others vice versa.
Another huge difference is that when usb is as removeable media, when it is partitioned by TinyCore usbinstall zip option, the second partition (fat32) will not be visible in Windows environment, because Windows treats removeable media as one partition. Only the first partition 16M will be visible. When this usb is in hard disk mode, the second partion will also be visible and show in Windows, allowing for easy backup of \tce or storing other content there. This may not be huge for those who do not use Windows, though...
If a usb stick you buy can be flipped to HDD mode, then it is a huge advantage and I have been buying only such recently, but you cannot tell before you test it...
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 09:39:40 AM
Edit: I meant Lexar utility, not Lexmark...
Title: Re: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 09:47:49 AM
roberts, tclfan:

Thanks for the info, will spend some time on the subject.
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 09:48:47 AM
It really depends on bios of machine and its capability. Not all install types will boot. That is why I offer 3 install types and UNetbootin. Between those four hopefully at least one will boot on machines that claim to boot from usb. Typically using option 'z' zip mode the bios will indicate usb boot zip.  FYI, I have found on some machines, you must also enable usb keyboard even if you are not using one. Also it seems the older computers offered zip booting and newer ones perfer HDD or Ext. There is no panacea for USB booting of pendrives. YMMV
From my experience I found that TinyCore usbinstall in zip mode is far superior  to Unetbootin, particularly when you use usb stick in HDD mode. It beautifully partitions into 16M TinyCore and \tce is placed on the second partition.
Unetbootin is not capable of this, and dumps all stuff into one partition formatted as removeable, not optimal way at all...
Title: Re: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 10:09:08 AM
From my experience I found that TinyCore usbinstall in zip mode is far superior  to Unetbootin, particularly when you use usb stick in HDD mode. It beautifully partitions into 16M TinyCore and \tce is placed on the second partition.
Unetbootin is not capable of this, and dumps all stuff into one partition formatted as removeable, not optimal way at all...

No, this not really true on this way. UNetbootin installs on the FAT partition but it is up to you how USB stick is partitioned! Also there is a big advantage of UNetbootin for newcomers mostly using WINDOWS, do not need TC already running.

My practice is to partition the USB drive on LINUX; with fdisk creating a 64M primary FAT partition for TC and to have some free space to transfer files between WINDOWS and LINUX and depending on size creating one or two primary LINUX partitions formatted for ext3 on the erst. Yes, I like (trust) more on journaling systems. When formatted, creating /tce directory on a LINUX partition.

Next I'm formatting the FAT partition on WINDOWS and installing TC with UNetbootin. When ready, editing boot parameters on WINDOWS with TOTAL COMMANDER.

On this way I have practically the same setup as ZIP installation on TC except that it boots :)
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 10:23:28 AM
This is a nice way to set up the second partition as Ext3, while preserving some portability with Windows...
Question: How do you TC usbinstall? Zip mode, let it set two partitions, second as Fat32, then reformat the second one to Ext3 and try to boot?
Title: Re: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 10:29:07 AM
This is a nice way to set up the second partition as Ext3, while preserving some portability with Windows...

Let everything up to TC usbinstall script, without changing anything.

This is a nice way to set up the second partition as Ext3, while preserving some portability with Windows...

Yes, and it can be done on a similar way by usbinstall also. This is what was my expectation. In the last years playing with bootable USB distros it is the first time seeing unbootable drive, I was really supprized seeing the boot error  >:( Just a small change.
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 10:45:47 AM
Perhaps not worth of your time, which is precious for TinyCore development, but eventually it would be interesting to dig to the bottom of this and find out what is responsible for not booting in Zip emulation after TC usbinstall...
Just as roberts precisely explained, as much as we have standard for CD booting, there is no standard at all for usb booting and depending on BIOS and usb stick it can behave wildly different... This is a pity, because usb is common nowadays but manufacturers never came together to set ground rules...
Title: Re: usbinstall -> unbootable stick
Post by: bmarkus on October 14, 2009, 11:03:59 AM
Perhaps not worth of your time, which is precious for TinyCore development, but eventually it would be interesting to dig to the bottom of this and find out what is responsible for not booting in Zip emulation after TC usbinstall...
Just as roberts precisely explained, as much as we have standard for CD booting, there is no standard at all for usb booting and depending on BIOS and usb stick it can behave wildly different... This is a pity, because usb is common nowadays but manufacturers never came together to set ground rules...

To be honest I haven't seen such variations in USB boot. Machines around me booted from USB without any issue. There were many different machines including ...books like Asus, Acer, IBM, Lenovo, Dell, ... as well as desktop machines with different BIOS and from different vendors, like MSI, ASUS, GIGABYTE, ...

My long time favorite for years, SLAX booted always fine from USB stick configured with its own WINDOWS or LINUX installation tool.

Or in case of old machines it was not possible to boot at all.
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 14, 2009, 11:36:07 AM
To narrow down the source of the problem: Was it booting after default usbinstall in Zip emulation, using TC 2.3? Default - I mean letting usbinstall format the second partition as Fat32, without subsequent change to Ext3?
And yes, the outcome of booting a usb stick may look the same, but interraction of BIOS is key. That is why roberts provided several different emulations in usbinstall to use...
Title: Re: usbinstall -> unbootable stick
Post by: Lee on October 14, 2009, 06:04:45 PM
Quote
...Bmarkus, Lee:
Normally when you buy a usb stick it comes as removeable media. Hardware of the usb stick allows to set this media to be as removeable or look like a hard disk drive. You can use a utility...

Lexar, Lexmark - what's in a name.  :)

Seriously, thanks for this tip.  I have a handfull of halg-gig lexar fireflies that I got from K-mart mega cheap on clearance (a good many months ago).  It turns out that my USB 1.0 computer (Asus A7-V mobo running Windows XP) won't recognize these things -at all- but the same box running tc had no problems with them (I don't remember if I tried booting from them).  I wonder now if I could use this trick to allow that box to access these usb sticks (its the only Windows box I plan on keeping around).
Title: Re: usbinstall -> unbootable stick
Post by: tclfan on October 15, 2009, 09:11:31 AM
Seriously, thanks for this tip.  I have a handfull of halg-gig lexar fireflies that I got from K-mart mega cheap on clearance (a good many months ago).  It turns out that my USB 1.0 computer (Asus A7-V mobo running Windows XP) won't recognize these things -at all- but the same box running tc had no problems with them (I don't remember if I tried booting from them).  I wonder now if I could use this trick to allow that box to access these usb sticks (its the only Windows box I plan on keeping around).
They look perfect for TC...
You can flip them into HDD emulation mode and see if it helps.
Recently I found an informative article on the Internet, where the author was claiming PCs have the best chance of booting to usb stick if the stick is in HDD emulation.  Since some sticks (from my experience 50/50) sticks cannot be flipped to HDD emulation (at least there is no utility available to do it), the author was recommending tricking usb stick to resemble HDD emulation by partitioning it into at least two partitions. Some BIOSs when they see two partitions, they think it is not removeable media but HDD and they boot.
In any case, those usb sticks that can be turned into HDD mode are far more valuable to users like me so when I buy one and test one to be such I go back and buy several of them. Their HDD capabilities go way beyond just booting. It is also other advantages, such as all partitions can be recognized by Windows and treated as hard disks.
Title: Re: usbinstall -> unbootable stick
Post by: curaga on October 16, 2009, 03:20:05 PM
You can test if it's a BIOS issue or not by booting the stick with Qemu:

qemu -hda /dev/sda
Title: Re: usbinstall -> unbootable stick
Post by: jls on October 18, 2009, 04:50:27 PM
You can test if it's a BIOS issue or not by booting the stick with Qemu:

qemu -hda /dev/sda
maybe qemu -usb -hda /dev/sda