xfs
[Top] [All Lists]

mkbootdisk and XFS revisited

To: linux-xfs@xxxxxxxxxxx
Subject: mkbootdisk and XFS revisited
From: wfrancis@xxxxxxxxxx
Date: Fri, 20 Apr 2001 16:17:26 -0700
Sender: owner-linux-xfs@xxxxxxxxxxx
After a bit of noodling, I came up with this which solves my problem.
It does assume your / is always /dev/*da1, but in my case that's
always true :-)  Wouldn't be hard to make it parse df output or something.
I suppose it's possible on some machines the initrd could be too large
for the "super" floppy, I'm not exactly sure how adaptive it is for
booting purposes. Haven't tested it on my SCSI machines either, so
YMMV.

Perhaps you could wedge something like this into the part of the 
Anaconda installer which prompts you to make a boot disk.  It 
does prompt you if you want to make a perfectly useless 
boot floppy for yourself, which I'm sure some people believe will
work as advertised.

#!/bin/sh

PATH=/usr/bin:/sbin:/bin

fdformat -n /dev/fd0u1722
mkfs -t ext2 /dev/fd0u1722
mkdir /tmp/mnt
mount /dev/fd0u1722 /tmp/mnt
cp /boot/vmlinuz-2.4.2-SGI_XFS_0.10.3 /tmp/mnt
mkinitrd /tmp/mnt/initrd-2.4.2-SGI_XFS.img 2.4.2-SGI_XFS_0.10.3

mkdir /tmp/test
BOOTDEV=/dev/sda1
mount /dev/sda1 /tmp/test > /tmp/mnt/mount.txt 2>&1
if grep -q "does not exist" /tmp/mnt/mount.txt; then
        BOOTDEV=/dev/hda1
fi

rm /tmp/mnt/mount.txt

cat <<EOF > /tmp/mnt/lilo.conf
boot=/dev/fd0u1722
prompt
timeout=50
message=/tmp/mnt/message
linear
map=/tmp/mnt/map
default=linux

image=/tmp/mnt/vmlinuz-2.4.2-SGI_XFS_0.10.3
        label=linux
        read-only
        initrd=/tmp/mnt/initrd-2.4.2-SGI_XFS.img
        root=${BOOTDEV}
EOF

cat <<EOF > /tmp/mnt/message

Red Hat Linux 7.1 bootdisk with Prerelease SGI XFS patches

EOF


lilo -C /tmp/mnt/lilo.conf

umount /tmp/mnt
rmdir /tmp/mnt
rmdir /tmp/test

exit 0



<Prev in Thread] Current Thread [Next in Thread>
  • mkbootdisk and XFS revisited, wfrancis <=