Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-21-2003, 05:09 PM
|
#1
|
Member
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365
Rep:
|
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
|
|
|
03-21-2003, 07:54 PM
|
#2
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
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
|
|
|
03-21-2003, 09:34 PM
|
#3
|
Member
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365
Original Poster
Rep:
|
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.
|
|
|
03-21-2003, 10:33 PM
|
#4
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
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
|
|
|
03-22-2003, 12:01 PM
|
#5
|
Member
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|