WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How do I boot USB via boot floppy?  (Read 30860 times)

Offline secdroid

  • Newbie
  • *
  • Posts: 29
How do I boot USB via boot floppy?
« on: January 02, 2009, 11:26:56 AM »
I have an old laptop that boots DSL 4.x from a USB stick via the DSL boot floppy.  (The DSL boot floppy loaded a tiny linux with USB drivers sufficient to load and boot the DSL image from the USB stick, even though the system BIOS didn't support USB booting.)

The TC boot floppy appears to be an entirely different sort of beast: just GRUB stanzas pointing to (hd0,1).

--- How can I boot TC from USB stick when the BIOS doesn't understand USB booting?

--- If I make a USB Linux swap partition (and do mkswap on that partition), will TC automagically find it or do I need to specify it somewhere?  (Minimal RAM available.)

TIA and I hope I didn't miss the answer in my searches.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: How do I boot USB via boot floppy?
« Reply #1 on: January 02, 2009, 12:42:56 PM »
i have not seen a solution to this either. someone had a similar goal with dsl-n, the larger 2.6 kernel version of dsl: http://www.damnsmalllinux.org/dsl-n/f/viewpost/2363.html

he was able to setup dsl to do what he wanted, then simply copy the right dsl-n images (ie manual frugal install) over the dsl images. i think there are only two, bzImage and tinycore.gz in tc.

no one was able to tell him if it mattered or if his idea was not recommended, but i'm not sure the dsl-n forums ever did very well.

with tc there is the additional issue of boot scripts probably being entirely different between dsl-n and tinycore. is that an issue here? i won't make an ignorant guess in an attempt to be helpful. i wouldn't give up yet, but i don't know if there is an official answer to your question (...yet!) if there is one, i just wasted your time. if there won't be one, i would use these hints in your attempt.

edit: unless the dsl boot floppy has the same problem as the grub in dsl: http://forum.tinycorelinux.net/index.php?topic=353.msg2211#msg2211
« Last Edit: January 02, 2009, 12:59:12 PM by tobiaus »

Offline secdroid

  • Newbie
  • *
  • Posts: 29
Re: How do I boot USB via boot floppy?
« Reply #2 on: January 02, 2009, 01:02:32 PM »
i have not seen a solution to this either. someone had a similar goal with dsl-n, the larger 2.6 kernel  i wouldn't give up yet, but i don't know if there is an official answer to your question (...yet!) if there is one, i just wasted your time. if there won't be one, i would use these hints in your attempt.

Thanks for the pointer.  It turns out that the situation with my old laptop matches the post you cited: no HD and dead CD.  Certainly worth learning from what he did.

I realize that there may be no "official" solution, near-term or ever.  There are certainly higher priority issues for a young distro.

Still, I like what I see when I boot the TC CD on another machine and would like to use 2.6 Linux on the old laptop in order to take advantage of the networking improvements.

Long term, I plan to put a CF adapter inside the laptop's HD bay.  I may end up using DSL via floppy/pendrive  to bootstrap into installing a bootable TC on internal CF.  DSL already put the machine on the network, which is a major part of the battle.

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: How do I boot USB via boot floppy?
« Reply #3 on: January 02, 2009, 01:35:03 PM »
I think that contains a syslinux boot image with the kernel and initrd added to it (and a customized syslinux.cfg)

TC's initrd is ~10M though, so it will not fit on a conventional floppy.  Perhaps there is a bootloader that supports reading off usb devices...?  In that case you could just change the .cfg for that to read the initrd off the usb device.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How do I boot USB via boot floppy?
« Reply #4 on: January 02, 2009, 03:57:22 PM »
There are solutions out there. In fact they may have matured since last I looked.

The solution that I have/use uses a Panasonic DOS/USB driver. I make a minimal DOS boot floppy with this driver.
Then using linld (or is it ldlin? )  bootloader, I can boot from floppy, see the USB pendrive as drive D:
Then using a DOS bat file load and run Tiny Core.

I will post more later.
10+ Years Contributing to Linux Open Source Projects.

Offline secdroid

  • Newbie
  • *
  • Posts: 29
Re: How do I boot USB via boot floppy?
« Reply #5 on: January 02, 2009, 04:45:56 PM »
The solution that I have/use uses a Panasonic DOS/USB driver. I make a minimal DOS boot floppy with this driver.
Then using linld (or is it ldlin? )  bootloader, I can boot from floppy, see the USB pendrive as drive D:
Then using a DOS bat file load and run Tiny Core.

That was a big help!

Panasonic USB DOS drivers seem to be highly regarded --
http://www.theinquirer.net/inquirer/news/069/1046069/yes-there-are-usb-drivers-for-dos
http://www.computing.net/answers/dos/usb-20-connections-on-dos-/13138.html
http://www.computing.net/answers/dos/usbaspisys-a-usb-driver-for-dos-/15928.html

... and I think you probably meant linld, loadlin's brother (which handles 2.6) --
http://troglobit.com/cgi-bin/wiki.pl?LinLd
http://lwn.net/Articles/102210/
http://ubuntuforums.org/showthread.php?t=573508&highlight=linld&page=2

Now I have a project for tomorrow.   8)

Offline secdroid

  • Newbie
  • *
  • Posts: 29
Re: How do I boot USB via boot floppy?
« Reply #6 on: January 03, 2009, 10:50:51 AM »
My project isn't going that well...

After trying other ways to boot, I finally formatted an "MSDOS Boot Floppy" on Windows XP, updated the config.sys, installed the two SYS files on the diskette, and DOS still can't find the test file on a 32MB FAT 16  partition on a known-good USB stick.

# cat /media/floppy/config.sys
device=USBASPI.SYS /w /v
device=DI1000DD.SYS

Here's what I get from the config.sys invocation on DOS boot ---

Starting...

ASPI for UHCI/OHCI USB mass-storage Version 1.07
 Copyright(C) 2001 NOVAC Co.,Ltd.
       Controller      : UHCI VID8086_PID7112
       Base I/O        :FCE0h
       Base Memory : 00000h
       ====================================
       === Connect the target device to USB port. ===
       === Press [ENTER] to continue                   ===
       ====================================

       USBASPI  :  Target USB device not found.

DI1000 ASPI DISK Driver Ver 2.00
Copyright(C)2001 NOVAC Co.,Ltf.

ASPI Manager not installed.

A:\>

***
Tried plugging in USB stick both before booting and after prompt, above.  No difference.

All this on hardware that boots the DSL boot floppy, which then boots DSL from USB.

***

Also tried using balder10 single-disk version of FreeDOS.  Doesn't see USB stick and FreeDOS clears screen before typing a long prompt, thus removing all config.sys info.  (Real helpful...)

Also tried pendrive linux methods --
http://www.pendrivelinux.com/2007/11/21/use-a-floppy-to-boot-usb-pendrive-linux/
wget http://pendrivelinux.com/downloads/pdlfloppy.img.gz
gzip -dc pdlfloppy.img.gz | dd of=/dev/fd0
GRUB could not locate boot files on known good USB stick, so their USB driver support not adequate
Using the GRUB command line "find" command manually, I couldn't the files either

Finally found out that Ubuntu Intrepid no longer loads floppy support.  Must "modprobe floppy" to use drive now.  (Ubuntu keeps surprising me, frequently in less than pleasant ways.)

***

I'm going to google around, but I'm pretty much out of ideas.  The built-in USB support in the syslinux(?) on the DSL boot diskette appears to work with my hardware, while the DOS add-on drivers don't.  I'm not sure that there's any way around that other than to boot DSL and use it to install TC on an internal CF disk or HDD.

Suggestions?

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: How do I boot USB via boot floppy?
« Reply #7 on: January 03, 2009, 11:41:13 AM »
To clarify: that boot image doesn't use usb support from the bootloader.  It loads the kernel and the minirt which has usb drivers.. and then reads the rest of the data from the USB device.  I guess you could make something like the above for TC if you really want to.

I haven't looked at linld before. There may be other similar projects out there though(?)

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How do I boot USB via boot floppy?
« Reply #8 on: January 03, 2009, 11:53:56 AM »
Don't give up just yet.

Much depends on how the pendrive is setup, if I recall it requires a zip style install, not a hdd one.

I know I have three pendrives that work with DOS USB.
Let me take a look to see what is the difference.

It is not linld at this point because the NOVAC stuff has not assigned a drive letter.
10+ Years Contributing to Linux Open Source Projects.

Offline secdroid

  • Newbie
  • *
  • Posts: 29
Re: How do I boot USB via boot floppy?
« Reply #9 on: January 03, 2009, 12:14:10 PM »
Much depends on how the pendrive is setup, if I recall it requires a zip style install, not a hdd one.

I know I have three pendrives that work with DOS USB.
Let me take a look to see what is the difference.

It is not linld at this point because the NOVAC stuff has not assigned a drive letter.

My understanding of both LinLd and LoadLin is that they are both DOS .com programs.  If DOS (plus loaded drivers) can't "see" your USB stick as a disk, neither can LinLd or LoadLin.

IIRC, Zip vs. HDD style did affect syslinux, but I don't think I'm at a point where we know whether it would matter here.  It would appear that the drivers loaded by the config.sys may not work against my laptop's chipset.  I still can't find the drive with standard DOS commands, even with the drivers loaded.

FWIW, my pendrives are PNY Attache 512 MB and they both work well with DSL.  I have not tested my Kingston DataTraveler 4 GB or Patriot 8 GB with either DSL or TC.

I could use DSL to try to determine the chipset in the laptop, but I haven't seen enough info in the driver documentation to tell me whether or not it is worth the effort.

Thank you, ^thehatsrule^, for the clarification.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How do I boot USB via boot floppy?
« Reply #10 on: January 03, 2009, 12:41:52 PM »
The reason you don't have an issue with the DSL boot floppies that I made are because back then the kernel (2.4) could fit on a floppy. The 2.6 kernel is much too big. When I made dsl-n is when I setup three dos usb floppies.

But back to the topic at hand.

It appears that dos usb can find a fat16 partition but nothing else.
My three pendrives that work are all fat16.

linld works and loads tiny core from a fat16 partition.

Be aware of the size limitations of using fat16. With tiny core it is not a problem.

HTH YMMV

10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How do I boot USB via boot floppy?
« Reply #11 on: January 03, 2009, 12:48:59 PM »
The reason I brought up zip vs hdd is because when I wrote those scripts, with zip I used fat16 and with hdd I used fat32.
With linld and dos usb you are not even using syslinux or ldlinux.sys.
10+ Years Contributing to Linux Open Source Projects.

Offline secdroid

  • Newbie
  • *
  • Posts: 29
Re: How do I boot USB via boot floppy?
« Reply #12 on: January 03, 2009, 12:57:30 PM »
Re: roberts @ 1:41  --
Quote
It appears that dos usb can find a fat16 partition but nothing else.
My three pendrives that work are all fat16.

linld works and loads tiny core from a fat16 partition.

I suspected that and it was the reason why I tried the 32 MB FAT16 test partition.  Unfortunately, I coudn't "see" it.  I'll have to try that again.  That is the key, since you succeeded with linld on FAT 16.  Thanks for the tips.  Time to retest...

FWIW --  Hardware (pretty vanilla) --
Processor PII 266 MHz
Host bridge Intel 440BX/ZX/DX (AGP disabled) (rev 02)
ISA bridge Intel 82371AD/EB/MB PIIX4 (rev 02)
USB Controller Intel 82371AB/EB/MB PIIX4 (rev 01)
...
From DSL 4.4.3 dmesg --
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 15:01:52 Oct 21 2005
usb-uhci.c: High bandwidth mode enabled
usb-uhci.c: USB UHCI at I/O 0xfce0, IRQ 5
usb-uhci.c: Detected 2 ports
...
USB Mass Storage support registered
...
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sda: 1001472 512-byte hdwr sectors (513 MB)
sda: Write Protect is off
sda: sda1 sda2

Offline secdroid

  • Newbie
  • *
  • Posts: 29
Re: How do I boot USB via boot floppy?
« Reply #13 on: January 03, 2009, 02:28:17 PM »
I'm out of gas.  Thought I'd document what I'd done.

Found USBASPI.SYS Version 2.27 Copyright ...Panasonic... 2008, filedate 10/08 at
http://panasonic.co.jp/pcc/products/drive/other/f2h_usb.html

Added /slow switch, removed /w switch in config.sys for usbaspi.sys invocation.  No improvement.

Googled for some wisdom.

From http://www.computing.net/answers/dos/usb-drivers-for-my-hp-8200-cd-rom/13628.html
Quote
Am interpreting for you:

> Controller: 00-07-2 VID=8086h PID=7112h (0000h-0000h) UHCI
> : I/O=FCE0h-FCFFh

The driver found a USB 1.1 controller (UHCI) running off an Intel chipset (8086) and it is I/O mapped (I/O=FCE0h-FCFFh).

Right for me, too.

Next we should see something like --
USB Device: HOST [00-07- VID=2 VID=8086h PID=7112h (0000h-0000h) UHCI]: |--VID=03f0h PID=0207h FS ... instead of ERROR : Target USB device not found.

From what I see, my issues are hardly unique.  The Panasonic drivers, while highly regarded, were intended for their own products.  In addition, my 1998 Intel chipset is pretty early.  DOS support of USB is not guaranteed and I appear to be one of the unlucky ones.  Lots of other folks have issues, too.

Bottom line: TC is indeed bootable from USB, via DOS floppy disk.  Of course that requires working DOS support of USB on your hardware.  If DOS USB works, follow roberts directions in the earlier post.

Thanks to roberts and ^thatsrule^ for the help and insights.  I'll just have to find a different way to install TCB on this box.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: How do I boot USB via boot floppy?
« Reply #14 on: January 03, 2009, 10:37:51 PM »
don't feel bad. in many years of using linux, sometimes one little project is easier if you just give up (on that one little project) for six months or a year. in that time, you may obtain different materials, or find new software tools.

it seems like a long time, with some projects a few months of waiting is a lot better than a few days or weeks of frustration.

and this is useless to you but someone said loadlin and linld are both .com files. that may be true, although i just read yesterday one is an .exe and the other is a .com. close enough?

also, i don't know what roberts has planned, but if anyone has a floppy for usb booting that is free to distribute (panasonic driver, i don't know) this may prompt an official solution in the near future. if it does, then you'll just be able to download an image and make the floppy. were you unable to use the dsl usb floppy for tinycore?