EasyManua.ls Logo

Linux Pocket Linux Guide - 5.3.8. Create a compressed root disk image; 5.4. Implementation; 5.4.1. System startup

Default Icon
67 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
fsck −ATCp
if [ $? −gt 1 ]; then
echo "Filesystem errors still exist! Manual intervention required."
/bin/sh
else
echo "Remounting / as read−write."
mount −n −o remount,rw /
echo −n >/etc/mtab
mount −f −o remount,rw /
echo "Mounting local filesystems."
mount −a −t nonfs,nosmbfs
fi
#
# end of local_fs
Set execute permissions on the script.
bash# chmod +x local_fs
5.3.8. Create a compressed root disk image
bash# cd /
bash# dd if=/dev/zero of=/dev/ram7 bs=1k count=4096
bash# mke2fs −m0 /dev/ram7 4096
bash# mount /dev/ram7 /mnt
bash# cp −dpR ~/staging/* /mnt
bash# umount /dev/ram7
bash# dd if=/dev/ram7 of=~/phase4−image bs=1k count=4096
bash# gzip −9 ~/phase4−image
5.3.9. Write the root disk image to floppy
Insert the diskette labeled "root disk" into drive fd0.
bash# dd if=~/phase4−image.gz of=/dev/fd0 bs=1k
5.4. Implementation
5.4.1. System startup
Start the system using the following procedure:
Boot the PC using the floppy labeled "boot disk".
At the grub> prompt, type the usual kernel and boot commands, but without the rw parameter this
time. In other words, type kernel (fd0)/boot/vmlinuz init=/bin/sh
root=/dev/fd0 load_ramdisk=1 prompt_ramdisk=1, press Enter then type boot and
press Enter.
Put in the recently created root disk when prompted.
The output should resemble the example below:
GNU GRUB version 0.95
grub> kernel (fd0)/boot/vmlinuz init=/bin/sh root=/dev/fd0 load_ramdisk=1 prompt_ramdisk=1
Pocket Linux Guide
Chapter 5. Checking and Mounting Disks 25

Table of Contents