7.3.7. Create the 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=~/phase6−image bs=1k count=4096
bash# gzip −9 ~/phase6−image
7.3.8. Copy the image to diskette
Insert the diskette labeled "root disk" into drive fd0.
bash# dd if=~/phase6−image.gz of=/dev/fd0 bs=1k
7.4. Implementation
7.4.1. System Startup
If everything goes well, the virtual console display should look similar to the following example:
Connected to tty1 at 38400 bps.
gnu−linux login:
7.4.2. Add a new user to the system
Log in as root.
Create a new, unprivileged user and new group by appending a line to the
/etc/passwd
and
/etc/group
files, respectively. Be sure to use a double greater−than (>>) to avoid accidentally overwriting
the files.
bash# echo "floyd::501:500:User:/home/floyd:/bin/sh" >>/etc/passwd
bash# echo "users::500:" >>/etc/group
bash# mkdir /home/floyd
bash# chown floyd.users /home/floyd
bash# chmod 700 /home/floyd
7.4.3. Test the new user's ability to use the system
Switch to virtual terminal tty2 by pressing ALT+F2.
Log in as floyd.
Try the following commands and verify that they work.
bash$ pwd
bash$ ls −l /
bash$ cat /etc/passwd
Pocket Linux Guide
Chapter 7. Enabling Multiple Users
40