site  contact  subhomenews

Fixed: finding USB partitions at bootup

November 28, 2010 — BarryK
Yesterday I posted that I would fix a little problem in Woof, then upload it. That "little" problem ended up taking me all day.

Wary testers had reported that when they booted off CD and saved the session to a USB drive, it was not found at next boot.

The problem actually is quite fundamental and has been in our puppies for a long time. There have been others who have reported their USB drive not being recognised at bootup, not just for Wary.

I make heavy use of USB hard drives, and every now and again I got a strange phenomenon -- only some of the partitions appeared as icons on the desktop -- one or more had disappeared. Replugging the USB drive fixed it.

Booting from CD, and after burning several CDs, I have finally fixed the recognition of USB drives.

When the usb-storage module is loaded, the 'init' script waits in a loop until the kernel reports "usb-storage: Device scan complete". In my case it is /dev/sdb, and /sys/block/sdb appears.

However, and this is what has caused all the trouble -- the partitions in my USB hard drive do not become available for another couple of seconds. Wait a couple more seconds and they appear as sub-directories in /sys/block/sdb.

I have created extra code in 'init' that loops waiting for the partitions to become available.

Now, at bootup, when you see this message:

Loading drivers needed to access disk drives...

You will see dots appearing on the end each second, about 5 seconds for the first loop, then a couple more seconds for the second loop. The second loop displays red dots, so you can see how long the wait has had to go into over-time.

If you don't have any USB storage devices plugged in, you only get a 3 second delay total.

The end of the story is I was able to save a session to the USB drive and it was recognised and usable at next boot. Yippeee!

Comments

I've noticed something like this


script for
«...finding USB partitions at bootup..»"charlie6"Hi Barry, again thanks for your time again ! Got to replug USB's quite every day...I suspect it decreases USB connectors lifetime. «I have created extra code in 'init' that loops waiting for the partitions to become available. » Are those extra codes even compatible with other Puppies (i.e. 4.1.2 / 4.20 / 4.3.1 / 511 estc...) ? It would be nice to have a copy of those extra codes to insert in the init file. A pet would be very appreciated. Thanks for any answer ! Charlie

It's in Woof
Username: BarryK
"Charlie, All future Woof-built puppies will have it, including Lupu 5.2. Retrofitting is difficult, can't just provide a PET, as the initrd.gz file has to be modified, as that is what has the 'init' script.

Boot slow down 17seconds if USB memory card reader in the PC
Username: manelapb
"BUG in Puppy 5.2 and luci254: if a internal multi memory card reader connected by USB is mounted in the PC the part of "Waiting for usb partitions" of the step "Loading drivers needed to access disk drives" takes 17 seconds more (this wait are the red dots). The problem is the wait for partitions in all USB sdX drives when most/all of them are empty so they will never show a partition. The timeout takes 17 seconds. My SD/MMC/xD/MS/Pro/Duo/CF/Microdrive memory reader uses sdb, sdc, sdd, sde, and sdf, and last fourl of them are empty on boot I boot from USB stick. Idea: Add a boot parameter e.g.: "waitdev=sdb1" to wait only the USB drive we know it has the save file for people who really needs that. In any case 17 seconds of timeout is too much... it should be reduced to lets say 5 seconds

Lupu and the Red Dots
Username: perthie
"Please read the discussion here. http://www.murga-linux.com/puppy/viewtopic.php?p=514875&sid=1df0b4b4828e227f4db9c674c4c5f709#514875

Not Red Dots, But Still a Problem
Username: perthie
"In both Spup-100 and Wary-511, if you boot off a flash drive with no internal hard drive, you get "Searching deeper ... xxx_xxx.sfs not found". I was incorrect in reporting this as the red-dot-USB problem. This is a pink-dot-cannot-find-the-SFS-file problem.

Re no boot usb
Username: BarryK
"I have written it down in my to-do list.

LiveCD booting
Username: GCMartin
"I haven't tried your latest WARY, Barry. (poet in me) But, the laptop with the DVD writer does NOT have a HDD at all. It does have a USB with a 4GB stick that I use as SWAP drive. The past multi-session LiveCD booting issues (er..non-booting) that I reported was firstly and mostly tested here because of this laptop's availability for much of my Puppy tests I run. Don't know if this points to a wider problem or if its related at all to this blog. Hope this helps.

Multisession on laptop
Username: BarryK
"Laptop optical drives cannot handle multisession CD/DVD. This problem has always been there, you have to use have to use a "proper" optical drive on a PC. Probably this should be explained somewhere, before people try, and fail. I don't know if this limitation applies to all laptop optical drives. If anyone knows of an exception,let us know. There was a post here recently by Ted Dog, that the Gujin bootloader can get around the limitation: http://bkhome.org/archive/blog2/201104/verified-multisession-cd-works.html ...it would be interesting to explore a live-CD with Gujin --- anyone interested?

Newer Gujin add much
Username: Ted Dog
"The Gujin bootloader has changed so much since I first researched that BIOS issue, I've been hampered by my MiniMacs wierd non-ejecting issues on poorly burned DVDs, took about three hours to eject a test DVD. Hint [b]hit F12[/b] during the later part of the startup-ding. Found where apple hides the terminal so my fingers are happier! Have not been able to boot any version of linux live CD since MiniMac download a 1.5G (yes Gig not M) update. Gujin has a 2 Meg iso, that boots anything.

Re no boot from usb
Username: BarryK
"Raffy, That was supposed to be fixed, I announced it awhile back in this blog. You need a recent Woof-built Puppy. Um, here is the post: http://bkhome.org/archive/blog2/201105/booting-from-usb-no-hd-fixed.html ...I have worked on that code since then, it is always possible that the fix has got unfixed!


Tags: woof