USB Bootimage for HDD?


Forum: USB booting
Topic: USB Bootimage for HDD?
started by: Sparken

Posted by Sparken on Jan. 20 2008,23:09
Hey Gang,

I have been trying -to no avail- to use a hard drive on a laptop strictly to act in the same
fashion as a bootfloppy... to allow a USB stick to be bootable.

Here's the deal... Old laptop: bios has no usb booting support, slow-questionable hard drive,
intermittent CD drive and no floppy. It may also be in places vulnerable to theft so I want the
Hard Drive empty.

I want the hard drive to act strictly as a boot floppy would, only to recognize the
USB stick and boot from it. I have messed around with Grub, and tried to force various
images onto the drive. No Joy. Seems like a simple task for one who knows what they are
doing and in this case, I am certainly not that one.

My Googlagle leads me to believe that I am alone in my quest.

Any Ideas?

Posted by lucky13 on Jan. 21 2008,03:53
What have you done with GRUB that didn't work?

edited

Posted by Sparken on Jan. 21 2008,05:10
I flailed around ineffectively with GRUB. It has been a while since I gave up on it,
but I tried assigning the root() assignment in GRUB to point to the USB stick,
but I could not determine whether it was not capable of working or I had bad
syntax. I just figured I was barking up the wrong tree.

Are you suggesting that GRUB is the way to go?

Posted by chaostic on Jan. 21 2008,07:06
What laptop + bios version?

Have you tried lilo?

Posted by curaga on Jan. 21 2008,09:43
You can do it like this:

- dd the bootfloppy to the HD. The HD will not be readable, but will be bootable.

Or, grub can do it like this:

- copy the kernel and initrd to the hd. Set grub to boot those, without any reference to the usb stick. It's how the bootfloppy works too, it boots itself, and the initrd finds the usb stick.

Posted by Sparken on Jan. 22 2008,04:24
I tried dd'ing the floppy image, that failed me for some reason, I will try
experimenting with GRUB in the manner you described and see what happens.

Thank you.

Posted by ^thehatsrule^ on Jan. 22 2008,04:34
Here's the "easiest" way I can think of:

Is there a problem on that hard drive?  If not, I'd just suggest for you to install a frugal and run it off there.

If there is a problem, you could still do the above... but copy the KNOPPIX file to your usb drive (and delete the one off your hard drive - might need to boot with fromusb and/or waitusb).  Note that the booting files will be on your hard drive still.  Essentially, this way will end up with a setup like what curaga described.

Posted by lucky13 on Jan. 22 2008,16:32
Quote
Is there a problem on that hard drive?  If not, I'd just suggest for you to install a frugal and run it off there.

I originally was going to suggest the same thing, only set /home on the USB stick since there would be nothing to worry about with the frugal install on the hard drive. That would boot a lot faster, too.

Posted by curaga on Jan. 22 2008,16:59
But having KNOPPIX on the hd would still allow the box to be booted, which he doesn't seem to want.
Posted by Sparken on Feb. 05 2008,07:17
Finally getting back to this and answer some questions.

The laptop is a Dell Inspiron 3500. Essentially a PII-400 with 196MB RAM.
The hard drive has an intermittent glitch that causes the system to
lock up. Reason 1 to avoid doing anything but booting from it.
But otherwise, this thing is a great knockabout laptop, runs great
with DSL and if it gets bashed or stolen, I won't cry too much.

I have done a frugal on this drive in the past and it will read my
backup file from the stick which would be enough to satisfy most folks.

I have several USB sticks that I boot from with various versions of DSL
and I've noticed that some of them behave abnormally with the latest version
of the DSL Knoppix image. Reason 2 why I don't want to be fixed to the
Knoppix on the drive.

My aim is to setup the drive so that any bootable stick will be recognized.
Also, I have been using Linux for over 10 years and I am ashamed at how
poorly I understand the boot process and GRUB. So I hope to learn.
I figure if anyone is going to know how to do this kind of thing, it is you guys.

I have done a Frugal install, then deleted the Knoppix image. It got further
than I imagined. It posted "Finding USB devices" then the next line
"Could not find Knoppix..." "dropping to a shell..." etc.

I am going to play with GRUB a bit more and get back this week with results.

Posted by gio3 on April 10 2008,19:38
I just reply to this old topic for future reference.
Problem solved  :;):
Just added in /boot partition a new partition /dos
copied in that partition bootfloppy.img and memdisk (got from sys-boot/syslinux)
than just edited grub.conf adding
Code Sample

title DSL USB
root (hd0,1)
kernel /dos/memdisk
initrd /dos/bootflop.img

In this way I just had to connect my USB key and boot from the HDD choosing DSL from the Grub menu, but I still had to digit
fromusb
at the DSL boot prompt.
So I decided to edit the syslinux.cfg from the bootfloppy.img using mtools
Just added
Code Sample
fromusb

after
Code Sample
DEFAULT linux24
APPEND

And now it boots directly from the HDD to the USB pen drive installation very fast and smoothly, and without the USB stick it obviously can't boot.
It's an old Dell inspiron 4100, not supporting USB boot and with a defective CD drive. Very happy with my new DSL USB install.  :)

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.