LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2005, 03:42 PM   #1
kocoman
LQ Newbie
 
Registered: Jun 2005
Posts: 8

Rep: Reputation: 0
I don't understand:Fast LILO boot floppy


I have a pentium 60 (isa only, the purple color cmos one) that only boots off A: or CPrimary master) any other will not work, I even tried smart boot manager but still same effect. I want to boot off hdb with a floppy. I wonder if this would work? It is confusing when it does a cp of the bzimage to a floppy, which of course will not fit on a 1.44mb disk with latest kernel.. and how can it link the bzimage without the filesystem mounted? thanks


www oreillynet com/pub/h/3225 (sorry I don't have 5 posts)
LINUX INSTALLATION HACK
Fast LILO boot floppy
Sometimes you want to leave the hard drive's boot setup alone, But booting from floppy is too slow or your bootimages (bzImage + initrd) don't fit on the floppy. Make a Linux Loader floppy that uses bootimages on the hard drive.

Contributed by: clsgis
[06/05/05 | Discuss (0) | Link to this hack]

Sometimes you want to leave the hard drive's boot setup alone, Whatever Linux installer you're using only has options to "make the hard drive bootable" or "make boot floppies" and neither one is really what you want. Perhaps you're developing a network install setup or preinstalling a drive for somebody else's computer. Maybe you're just learning about kernel 2.6, and you discovered you can't just copy bzImage to the raw floppy device any more. Maybe you've got a Compaq Armada and sombody blew away its hard drive-resident boot utilities. You just want a faster boot floppy for that drive, or you want one boot floppy instead of a kernel disk and an initrd disk.

For example, I'm preinstalling Debian on a drive which will be the new /dev/hdb in my friend's PC. Right now it's /dev/hdb in my test PC. My friend doesn't want to touch MSFT's MBR just yet. None of Debian's kernels was just right for my friend's old Dell, so I built a new bootimage file /usr/src/linux-2.6.11.11/ arch/i386/boot/bzImage and he's gonna use a boot floppy for a while.

I'll use the DOS file system for its low space overhead. I'll prepare the diskette by filling it with zeroes so its image will compress well, and testing it. I'll put a backup copy of the bootimage on the floppy, but we probably won't need it. You may have to be root to do this.


ps axw | egrep '(amd|mount)' # look for interfering daemons
killall /usr/sbin/automount # and kill them!
umount /dev/fd0
dd bs=1k < count=1440 /dev/zero > /dev/fd0
floppycontrol -f
dd bs=1k count=1440 < /dev/zero | \
cmp - /dev/fd0 && \
echo the diskette has no defects

mkdosfs /dev/fd0
mkdir /fd
mount -t msdos /dev/fd0 /fd
cp /boot/boot-menu.b /fd/boot.b
cp /usr/src/linux-2.6.11.11/arch/i386/boot/bzImage /fd || \
echo oops the copy failed
# use whatever editor you like
vi /fd/conf /fd/msg

This is /fd/conf


compact
boot=/dev/fd0
root=/dev/hdb2
install=menu
map=/fd/mapfile
menu-title="Dorothy's boot floppy"
message=/fd/msg
prompt
timeout=500
vga=normal
image=/usr/src/linux-2.6.11.11/arch/i386/boot/bzImage
label=hdlinux
read-only
image=/fd/bzimage
label=fdlinux
read-only
other=/dev/hda
label=msft
other=/dev/hdb
label=hdb

Here's the install command. I'll use the boot loader boot-menu.b from where Debian put it. You might find it someplace else on your system.


lilo -i /boot/boot-menu.b -C /fd/fd0
umount /fd

The /fd/msg file is any text you want between the menu and the boot prompt.

Here's a command to store a compressed image of this floppy in /boot.

bzip2 < /dev/fd0 > /boot/bootfloppy.bz2
and this command makes a new diskette.

bzip2 -dc /boot/bootfloppy.bz2 \
> /dev/fd0 && floppycontrol -f && \
bzip2 -dc /boot/bootfloppy.bz2 | \
cmp - /dev/fd0 && \
echo the copy is good

Floppies go bad, so you should make a new one every few months. At boot time, the Linux Loader LILO reads the mapfile from this floppy, and the bootimage from hard drive. The other menu choices boot the backup bootimage, or the Master Boot Records from either hard drive. Maybe you set up the GNU Grand Unified Boot Loader on the second drive, but your old BIOS won't load it from there. This will launch GRUB, quickly.

The Linux Loader is still evolving. You might need to upgrade to the current version. You might have the obsolete LaTeX documentation. (For example, the function of the install= directive has changed since that was written.) You might find newer documentation packaged with Lilo's source code.
 
Old 06-16-2005, 12:37 AM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
Re: I don't understand:Fast LILO boot floppy

Quote:
Originally posted by kocoman
It is confusing when it does a cp of the bzimage to a floppy, which of course will not fit on a 1.44mb disk with latest kernel.
and
None of Debian's kernels was just right for my friend's old Dell, so I built a new bootimage file /usr/src/linux-2.6.11.11/ arch/i386/boot/bzImage and ...[/QUOTE]

It's not just that the kernel images aren't 'just right' ... they're also too big.
These kernels are built to run on just about everything.
You will need to compile your own kernel to reduce it's size,
selecting only the features that you need.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB LILO boot floppy idris1388 Linux - Software 2 04-12-2005 06:53 AM
2.6.6, LILO and boot floppy... iZvi Linux - General 1 06-06-2004 07:08 AM
Windows 98 boot with lilo problem, help need fast Geefthegreat Linux - General 10 04-13-2004 08:52 PM
LILO Boot Floppy - RH9 uxu Linux - Newbie 2 10-12-2003 12:55 PM
Lilo boot disk on floppy TarFile Slackware 2 03-17-2003 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration