add directory study
This commit is contained in:
28
study/boot/rootdiskette/makebootdisk_initrd
Normal file
28
study/boot/rootdiskette/makebootdisk_initrd
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /home/lennartb/myboot
|
||||
echo Making all files owned by root
|
||||
chown -R 0:0 rootfs
|
||||
echo Creating new root file system image.
|
||||
rm -f root.img.gz
|
||||
dd if=/dev/zero of=root.img bs=1k count=1000
|
||||
mke2fs -F -N 200 root.img
|
||||
echo Copying files.
|
||||
mount -o loop root.img /mnt
|
||||
cp -a rootfs/* /mnt
|
||||
umount /mnt
|
||||
echo Compressing.
|
||||
gzip -9 root.img
|
||||
echo Making a new LILO diskette.
|
||||
mke2fs /dev/fd0
|
||||
echo Copying to LILO diskette.
|
||||
mount /dev/fd0 mnt
|
||||
mkdir mnt/boot
|
||||
cp root.img.gz mnt/boot
|
||||
cp linux/arch/i386/boot/zImage mnt/boot
|
||||
cp /boot/boot.b mnt/boot
|
||||
echo Running LILO
|
||||
lilo -C lilo-initrd.conf
|
||||
umount mnt
|
||||
echo Finished.
|
||||
|
||||
Reference in New Issue
Block a user