LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-21-2003, 05:09 PM   #1
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Rep: Reputation: 30
Creating a Boot Floppy


I have always created an emergency boot floppy during
a Slackware install. However this only creates a boot
disk which boots the install kernel configuration. If I
recompile the kernel, to add drivers, remove unneeded
components to enable hardware to work properly,
I have always created a new emergency disk using
the new kernel and the general command:

dd if=/boot/vmlinuz of=/dev/fd0 bs=8192

I have never had to use one since the new kernel has
always worked properly. However in anticipation of
installing GRUB, I decided to test my disk created in the
above fashion and it failed miserably.

Reading Linux-Boot-HOWTO, I am reminded that an
emergency disk can be created simply by:

make bzdisk

While this is all well and good, I am wondering why the
general copy of the kernel mentioned above doesn't
work. Further reading indicates that to properly create
a disk from a kernel image the following applies:

-------------------------
If you are not using LILO, transfer the kernel to the bootdisk with dd:

% dd if=KERNEL of=/dev/fd0 bs=1k
353+1 records in
353+1 records out

In this example, dd wrote 353 complete records + 1 partial record, so the kernel occupies the first 354 blocks of the diskette. Call this number KERNEL_BLOCKS and remember it for use in the next section.

Finally, set the root device to be the diskette itself, then set the root to be loaded read/write:

rdev /dev/fd0 /dev/fd0
rdev -R /dev/fd0 0

Be careful to use a capital -R in the second rdev command.
-------------------------

Is this essential?

How would I use rdev to change the ramdisk word to indicate
that root should be mounted from the hard disk?

The manpage on rdev is somewhat confusing but it looks
like I would have to use something like:

rdev -R /dev/hda2 0

but it is unclear.

TIA
 
Old 03-21-2003, 07:54 PM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
That is pretty much what I have in my notes for quick and dirty boot disk.
rdev "boot device" "root partition" is the way I use it.
rdev /dev/fd0 /dev/hdax
 
Old 03-21-2003, 09:34 PM   #3
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Original Poster
Rep: Reputation: 30
I ran a 'make bzdisk' on this Slack 9.0 rc1 system and
got the message:

root device is (3, 2)
Boot sector 512 bytes
setup is 4649 bytes
warning: kernel is too big for standalone boot from floppy
dd bs=8192 if=bzImage of=/dev/fd0
122 +1 records in
122 +1 records out

Tried to boot with it and got a repeating message:
AX: 0212
BX: 7600
CX: 0501
DX: 0100
100B

I guess this is the problem. Size of linux in /boot is 1,005,805

Just as a check, I created a boot disk under a Slack 8.0 distro
with a recompiled kernel of size 829,618 and got:

101 +1 records in
101 +1 records out

Booting with this disk works. However, trying to create a disk
with the original install kernal of size 1,396,901 I get:

170 +1 records in
170 +1 records out.

Booting with it produces:

- Uncompressing Linux....
Invalid compressed format (err=1)
-- System halted

Now I know I created a boot disk with this kernal when I
originally installed 8.0 and I know I can go in and create
a new one by running 'setup' again.

What is the maximum size of a kernel that can be fitted to
a floppy?

What does the 'setup' boot disk creation do that a standard
dd'ing does not?

Why can't I run 'setup' in Slack 9.0?

I did create a boot disk in 'setup' when I originally installed
the distro with a kernel size of 1,171,441.
 
Old 03-21-2003, 10:33 PM   #4
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
I have not used the 'make bzdisk' command.
I use the 'dd' command you mentioned.
dd if=kernelimage of=/dev/fd0
rdev /dev/fd0 /dev/hdax
 
Old 03-22-2003, 12:01 PM   #5
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Original Poster
Rep: Reputation: 30
Best answer:

Slackware uses SYSLINUX to create a DOS/VFAT type boot
floppy when you create an emergency disk when installing.

The benefit of this is that it puts a copy of your kernel
on a DOS formatted floppy along with some additional
files to make it bootable. The advantage is that the floppy
will now accommodate larger kernel file sizes where the

dd if=/boot/vmlinuz of=/dev/fd0 bs=8192

creates an IMAGE file which can easily overcome the size
limitations of a 144 disk.

My newly created floppy contents are as follows:

03/22/2003 12:07a 1,005,805 vmlinuz
03/04/2003 11:02p 369 syslinux.cfg
03/04/2003 11:03p 7,836 ldlinux.sys
03/04/2003 11:02p 653 f1.txt
03/04/2003 11:02p 678 message.txt

Try Syslinux Home Page
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Creating a boot floppy..... deft Linux - Software 2 08-19-2004 10:42 AM
Creating a Boot Floppy for Dual Boot Setup? jdanniel Linux - Newbie 8 08-07-2004 02:08 PM
creating boot up floppy in MDK 9.2 petkov Mandriva 1 07-01-2004 11:55 PM
Need help creating Mandrake 9.2 boot floppy rpikulski8 Linux - Newbie 4 05-18-2004 02:53 PM
Creating boot floppy Gennady Linux - Newbie 1 04-14-2004 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:32 AM.

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