[6690] in RedHat Linux List
Re: How to build a new bootdisk?
daemon@ATHENA.MIT.EDU (Alair Pereira do Lago)
Fri Nov 29 14:26:51 1996
To: redhat-list@redhat.com
From: Alair Pereira do Lago <alair@ime.usp.br>
Date: 29 Nov 1996 17:21:28 -0200
In-Reply-To: Andreas Stuebinger's message of Mon, 25 Nov 1996 08:54:02 +0100 (MET)
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Andreas Stuebinger <stuebing@fmi.uni-passau.de> writes:
> So my question is, how to include mcdx.o in a self-made
> boot disk? I do not like to use a hd-install.
I asked a similar question few weeks ago and but I had no answer in your
precise question.
I will give you the info I have and I hope it helps. If someone else could
complete/correct, I would like it a lot.
The boot.img has the kernel and lilo in the first 500K, (there is a new
version where it is in the first 600K) in a
ext2 filesystem. In the remaining of the disk, it has the root partition in
another ext2 filesystem. Gzipped.
> [root@tutu:/tmp] md mnt
> [root@tutu:/tmp] mount -t ext2 boot.img mnt
> mount: boot.img is not a block device
> [root@tutu:/tmp] mount -t ext2 /dev/fd0 mnt
I have the boot-disk in the first floppy.
> mount: block device /dev/fd0 is write-protected, mounting read-only
> [root@tutu:/tmp] cd mnt
> [root@tutu:/tmp/mnt] ls -l
> total 375
> drwxr-xr-x 2 root root 1024 Sep 10 14:58 boot
> drwxrwxr-x 2 root root 1024 Sep 10 14:58 dev
> drwxrwxr-x 2 root root 1024 Sep 10 14:58 etc
> drwxr-xr-x 2 root root 12288 Sep 10 14:58 lost+found
> -rw-r--r-- 1 root root 364921 Nov 18 16:20 vmlinuz
> [root@tutu:/tmp/mnt] ls etc
> lilo.conf
> [root@tutu:/tmp/mnt] cat etc/lilo.conf
> boot=/dev/fd0
> map=/boot/map
> install=/boot/boot.b
> prompt
> timeout=50
> image=/vmlinuz
> append="load_ramdisk=1 prompt_ramdisk=0 ramdisk_start=500"
the 500K ^^^
> label=linux
> root=/dev/fd0
> read-only
> [root@tutu:/tmp/mnt]
> [root@tutu:/tmp/mnt] cd ..
> [root@tutu:/tmp] umount mnt
>
> [root@tutu:/tmp] dd if=/dev/fd0 of=root-part bs=1k skip=500
> 940+0 records in
> 940+0 records out
> [root@tutu:/tmp] file root-part
> root-part: gzip compressed data, deflated, last modified: Sun Oct 6 02:03:36 1996, max compression, os: Unix
> [root@tutu:/tmp] zcat root-part > root
>
> zcat: root-part: decompression OK, trailing garbage ignored
> [root@tutu:/tmp] ls -l root
> -rw-r--r-- 1 root root 2048000 Nov 29 16:47 root
> [root@tutu:/tmp]
Now you should edit this file root. It is a root file system image and must contain
the module you have mentioned somewhere. So you could replace it for your
needs.
I do not know how to do it well since when I try to mount it, I get the
following msg:
> [root@tutu:/tmp] mount -t ext2 -o nodev root mnt
> mount: root is not a block device
> [root@tutu:/tmp]
I suggest you to get info in the /usr/src/linux/Documentation directory once
you have installed the kernel-sources somewhere. The file describing RAMDISKs
should help you.
I suggest you to use the sources of kernel 2.0.18 and no other to generate
your module. This may avoid some problems.
I hope this helps you.
PS:
Another possibility, would be if you compile the kernel 2.0.18 (get the RPM
package with all the kernel sources) with all options unchanged?? but the
particular device in such way that for this particular device you put it in
the kernel (not a module) and you copy the new zImage as
> [root@tutu:/tmp/mnt] cp /usr/src/linux/arch/i386/boot/zImage /tmp/mnt/vmlinuz
when the boot-disk where mounted.
--
Alair Pereira do Lago <alair@ime.usp.br> <http://www.ime.usp.br/~alair>
Computer Science Department -- Universidade de S~ao Paulo -- Brazil
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null