Label's and things

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




           fstab and Grub

I grow tired of all the Label things going on in Fedora now. I wanted to let a user mount and unmount file systems since I'm the only user...I had this all working in Red Hat 9. Then I went to Fedora Core 4 and to my dismay I found that HAL was writing fstab every boot up. So you really didn't want to play with it any more.

Now on my FC6 I see that fstab and grub are not messed with by HAL any more. So I set about to make things people readable. Here is what "fdisk" finds on my two hard drives:

The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        1217     9775521   83  Linux
/dev/hdb2            1218        1945     5847660   83  Linux
/dev/hdb3            1946        1961      128520   82  Linux swap / Solaris
/dev/hdb4            1962       19457   140536620    5  Extended
/dev/hdb5            1962        7060    40957686   83  Linux
/dev/hdb6            7061       12159    40957686   83  Linux
/dev/hdb7           12160       18534    51207156   83  Linux

Command (m for help):


[root@localhost ~]# fdisk /dev/hda

The number of cylinders for this disk is set to 59598.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 30.7 GB, 30758289408 bytes
16 heads, 63 sectors/track, 59598 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       19524     9839781    7  HPFS/NTFS
/dev/hda2           19524       20369      425722+  82  Linux swap / Solaris
/dev/hda3           20369       40689    10241437+   5  Extended
/dev/hda4           40689       59591     9526545   83  Linux
/dev/hda5           20369       30537     5124703+  83  Linux
/dev/hda6           30537       40689     5116671   83  Linux

Command (m for help):

There is a lot of old linux partitions shown.

What I did then is edit fstab and grub.conf and replace the lables with actual /dev/hda1 type devices.

   My original fstab looks like this:

LABEL=/1234             /                       ext3    defaults        1 1
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=+`àQñGM@O2RÕ{ÏA   swap                    swap    defaults        0 0
LABEL=ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ   swap                    swap    defaults        0 0

The swap listings were ugly!

Here is what it looks like now:

[root@k5d ~]# more /etc/fstab
/dev/hdb5               /                       ext3    defaults        1 1
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
/dev/hda2               swap                    swap    defaults        0 0
/dev/hdb3               swap                    swap    defaults        0 0
/dev/hdb7               /fc4                    ext3    noauto, user    0 0
[root@k5d ~]#

For some reason the last line is not working right. I think maybe I need to remember what I did. Maybe a # at the first and last line.

   Grub is now looking like this:

# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,6)
#          kernel /boot/vmlinuz-version ro root=/dev/hdb7
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,6)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.20-1.2962.fc6)
       root (hd1,4)
       kernel /boot/vmlinuz-2.6.20-1.2962.fc6 ro root=/dev/hdb5 rhgb quiet
       initrd /boot/initrd-2.6.20-1.2962.fc6.img

title Fedora Core (2.6.20-1.2952.fc6)
       root (hd1,4)
       kernel /boot/vmlinuz-2.6.20-1.2952.fc6 ro root=/dev/hdb5 rhgb quiet
       initrd /boot/initrd-2.6.20-1.2952.fc6.img

title Fedora Core (2.6.16-1.2111_FC4)
       root (hd1,6)
       kernel /boot/vmlinuz-2.6.16-1.2111_FC4 ro root=/dev/hdb7 rhgb quiet
       initrd /boot/initrd-2.6.16-1.2111_FC4.img

title Fedora Core (2.6.16-1.2108_FC4)
       root (hd1,6)
       kernel /boot/vmlinuz-2.6.16-1.2108_FC4 ro root=/dev/hdb7 rhgb quiet
       initrd /boot/initrd-2.6.16-1.2108_FC4.img

title Fedora Core (2.6.11-1.1369_FC4)
       root (hd1,1)
       kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/hdb2 rhgb quiet
       initrd /boot/initrd-2.6.11-1.1369_FC4.img

title Fedora Core (2.6.5-1.358)
       root (hd1,0)
       kernel /boot/vmlinuz-2.6.5-1.358 ro root=/dev/hdb1 rhgb quiet
       initrd /boot/initrd-2.6.5-1.358.img

title WindowsXP
       rootnoverify (hd0,0)
       chainloader +1
[root@k5d ~]#


I have rebooted with all these changes and it comes up just as well as always. Unless someone thinks this is real bad I will continue with the project.

Karl


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux