[root@localhost ~]# blkid
/dev/sda1: LABEL="WINDOWS" UUID="B074BA0574B9CDFA" TYPE="ntfs"
/dev/sda5: LABEL="WINDATA" UUID="51FDE27748FF62D3" TYPE="ntfs"
/dev/sda6: LABEL="data" UUID="4c5380f7-e164-461a-b3f2-a161512422e4" TYPE="ext3"
/dev/sdb1: UUID="4b9da18a-3aa8-4f04-9bce-469e9961a4bb" TYPE="swap"
/dev/sdb5: UUID="38388736-15b8-49f7-9b0b-5312b58d8c50" TYPE="ext4"
/dev/sdb6: UUID="640f76b5-5c72-4dee-a2b6-5eb9b1409ce5" TYPE="ext4"
[root@localhost ~]# fdisk -l -u=cylinders
Disk /dev/sda: 122,9 GB, 122942324736 byte
240 huvuden, 63 sektorer/spår, 15881 cylindrar
Enheter = cylindrar av 15120 · 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Diskidentifierare: 0x95029502
Enhet Start Början Slut Block Id System
/dev/sda1 * 1 3386 25598128+ 7 HPFS/NTFS
/dev/sda2 3387 15881 94462200 5 Utökad
/dev/sda5 3387 7768 33127888+ 7 HPFS/NTFS
/dev/sda6 7769 15881 61334248+ 83 Linux
Disk /dev/sdb: 160,0 GB, 160041885696 byte
240 huvuden, 63 sektorer/spår, 20673 cylindrar
Enheter = cylindrar av 15120 · 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Diskidentifierare: 0x1549f232
Enhet Start Början Slut Block Id System
/dev/sdb1 * 1 289 2184808+ 82 Linux växling / Solaris
/dev/sdb2 290 20673 154103040 5 Utökad
/dev/sdb5 290 3193 21954208+ 83 Linux
/dev/sdb6 3194 20673 132148768+ 83 Linux
How can I start console as root if I am logged in as a ordinary user?
Now it's time for me to go to bed. I'll come back tomorrow!
If you wish to use shorter, meaningful, labels rather than UUID numbers to identify your partitions, now would be the time to create them for your partitions on /dev/sdb. You can do this with the command
[root@localhost ~]# tune2fs -L <label name> /dev/<whatever> <Enter>
Do
not try to label the
extended partition, as it's only a
container. Label the
logical partitions within the container
To label a
swap partition, one must first turn off swap, reformat with the label, then turn swap back on, using the label to verify its proper creation.
[root@localhost ~]# swapoff -a <Enter>
[root@localhost ~]# mkswap -L <label name> /dev/sdb1 <Enter>
[root@localhost ~]# swapon LABEL=<label name> <Enter>
[root@localhost ~]# swapon -s <Enter>
If you do this, the
new labels will show up when the
blkid command is given again.
Once the labels are created and verified,
/boot/grub/menu.lst can be edited so each stanza takes this form.
title MiniMe 2010
kernel (hd0,13)/boot/vmlinuz BOOT_IMAGE=MiniMe_2010 root=LABEL=minime2010 resume=LABEL=swap1000 vga=791
initrd (hd0,13)/boot/initrd.imgYou would, of course, use
your own labels.Editing
/etc/fstab takes this form;
# Entry for /dev/sdc14 :
LABEL=minime2010 / ext4 defaults,noatime 1 1
LABEL=TR5-Documents /home/polack/Documents ext3 rw,user,noauto,exec,noatime 0 0
LABEL=Documents2 /home/polack/Documents2 ext3 rw,user,noauto,exec,noatime 0 0
LABEL=share1 /share1 ext4 rw,user,noauto,exec,noatime 0 0
LABEL=share9 /share9 ext3 rw,user,noauto,exec,noatime 0 0
LABEL=movies /movies ext3 rw,user,auto,exec,noatime 0 0
LABEL=movies2 /movies2 ext3 rw,user,auto,exec,noatime 0 0
LABEL=storage00 /zstorage00 ext3 rw,user,noauto,exec,noatime 0 0
LABEL=120backup /zbackup ext3 rw,user,noauto,exec,noatime 0 0
LABEL=boot200 /mnt/boot ext3 rw,user,noauto,exec,noatime 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda2 :
LABEL=swap1000 swap swap sw,pri=3 0 0
# Entry for /dev/sdb2 :
LABEL=swap750 swap swap sw,pri=3 0 0
none /dev/pts devpts mode=0620 0 0
/dev/fd0 /mnt/floppy auto rw,user,noauto,exec 0 0
/dev/sr0 /mnt/cdrom auto ro,user,noauto 0 0
/dev/sr1 /mnt/dvd auto ro,user,noauto 0 0
# none /dev/shm tmpfs defaults 0 0
When
both files have been
properly edited, then it's time to run the
mkinitrd command for your particular kernel.