[hllug] Re: Aid fixing fstab

  • From: Herb Cee <hc@xxxxxxxxxxx>
  • To: hllug@xxxxxxxxxxxxx
  • Date: Sun, 13 Sep 2009 19:26:01 -0500

Lee Parmeter wrote:
Herb Cee wrote:
Hi all If more info is needed please feed me the code.

I sure need fixing. My /etc/fstab is messed and I have spent hours reading all I could google and it still is confusing to me. This could be a senior problem since I begin my #80 orbit next Mon the 14th. I complete orbit #79, I claiming that as excuse LOL. I can tell ya one thing fer sur is this growing old crap ain't for sissies, arrrggg.

Box is P-4 ECS945G-M3, Intel 3.0G dualcore, 3G DDR2 800 running Unbuntu 8.04 desktop on 5 port router, 2 desktops U-804, 1 desktop Win-XP sharing w/samba.

My objective for this box is to mount a 2nd 200GB SATA HD as sdb with 3 partitions that have been created and sdb1 already contains a backup copy of all data on sda3/home. I want to put a copy of Win-ME on sdb2, if I can but not sure about that. I flagged it in gparted for boot. Does that create a MBR that Windows can understand?

I opened Gparted and formated sdb2 ->FAT32, sdb3 ->ext3. Currently I can access /home on sda3 & sdb1 /media/BackupAuto. Opening Places menu I see Computer + 4 partitions only the sdb1 is mounted (43.3G), mounting (3.8G) opens in /media/disk-1, mounting (5.2G) is /media/disk-2, mounting (141.6G) os /media/disk-3.

Now looking in gparted I see sda1 is /media/disk-1 (3.57G), sda6 is / (171.2G), sda2 is extended and unmounted (182.74G), sda5&7 are both marked swap (5.78Gea) total 186.33 (ignoring sda2???) sdb1 is /media/BackupAuto (49.6G), sdb2 is /media/disk-2 (4.88G), sdb3 is /media/disk-3 (131.8G) total is 186.28G Why are there 2 swap partitions? Can I reformat one of them?

***********************
fdisk -l
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00026e35

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         466     3743113+  83  Linux
/dev/sda2             467       24321   191615287+   5  Extended
/dev/sda5 23568 24321 6056473+ 82 Linux swap / Solaris
/dev/sda6             467       22813   179502214+  83  Linux
/dev/sda7           22814       23567     6056473+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003f81b

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1             638        7111    52002405   83  Linux
/dev/sdb2   *           1         637     5116671    b  W95 FAT32
/dev/sdb3            7112       24321   138239325   83  Linux

Partition table entries are not in disk order
*************************
Here is : df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             170G   26G  136G  17% /
varrun                1.5G  236K  1.5G   1% /var/run
varlock               1.5G     0  1.5G   0% /var/lock
udev                  1.5G   84K  1.5G   1% /dev
devshm                1.5G  192K  1.5G   1% /dev/shm
lrm 1.5G 40M 1.5G 3% /lib/modules/2.6.24-24-generic/volatile
/dev/sdb1              50G   22G   25G  47% /media/BackupAuto
gvfs-fuse-daemon      170G   26G  136G  17% /home/herb/.gvfs
***************************
Here is my current fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda6
UUID=7f626614-47e8-4bfd-9e3a-4a6ffbf7dca6 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda7
UUID=22104377-90f8-4b16-a007-b9cfb68675df none swap sw 0 0
/dev/sdb1    /media/BackupAuto   ext3    defaults     0        2
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
# /dev/sdc1 /media/BackupManual ext3 defaults 0 2
/dev/fd0 /media/floppy0 vfat rw,user,noauto 0 0
#
*****************
Contents of directories /mnt & /media
herb@Belf:~$ ls /media
BackupAuto  BackupManual  cdrom  cdrom0  disk  linuxstore  samba
herb@Belf:~$ ls /mnt
satasdb1
herb@Belf:~$

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         466     3743113+  83  Linux
/dev/sda2             467       24321   191615287+   5  Extended
/dev/sda5 23568 24321 6056473+ 82 Linux swap / Solaris
/dev/sda6             467       22813   179502214+  83  Linux
/dev/sda7           22814       23567     6056473+  83  Linux


My best guess is to rewrite the fstab enterring all the partitions I want to be mounted using the form like the removed line
 /dev/sdc1 /media/BackupManual ext3 defaults 0 2
so be.....

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# HD partitions
/dev/sda1 /media/disk-1 ext3 defaults 0 2
/dev/sdb1 /media/BackupManual ext3 defaults 0 2
/dev/sdb2 /media/disk-2 fat32 defaults 0 2
/dev/sdb3 /media/disk-3 ext3 defaults 0 2
/dev/sdc1 /media/BackupManual ext3 defaults 0 2
# CD & Flop
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 vfat rw,user,noauto 0 0
#

Then I would add directories /disk-1, /disk-2, /disk-3.
Thanks for looking at this and getting me sorted out
herb
______________________________________________________________________________
Highland Lakes Linux User Group (HLLUG): http://www.hllug.org
HLLUG mailing list: //www.freelists.org/list/hllug

The "current" /etc/fstab" file is apparently not your original working "fstab". Is this correct? There is no "/dev/sda3" in your "fdisk -l" listing either so I am confused by the statement below:

"My objective for this box is to mount a 2nd 200GB SATA HD as sdb with 3 partitions that have been created and sdb1
already contains a backup copy of all data on sda3/home."

Does your computer boot with the "current" fstab?

The following listing of "/dev/sda" tells me you have a boot partition on /dev/sda1, a swap on /dev/sda5 and two linux partitions. One is probably "/" and the other may be "home".

 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         466     3743113+  83  Linux
/dev/sda2             467       24321   191615287+   5  Extended
/dev/sda5 23568 24321 6056473+ 82 Linux swap / Solaris
/dev/sda6             467       22813   179502214+  83  Linux
/dev/sda7           22814       23567     6056473+  83  Linux

Please clear this up for me and then I should be able to help you reconstruct fstab and add the additional partitions on the 2nd drive /dev/sdb.

-Lee
Lee, you are correct! The current fstab is the result of changing from the original install where i had 3 - 200GB HDs and I had thought to install a raid device but after thinking it over I decided to not do the raid and just move the 3rd HD out to another box. However on rebooting the boot failed with the sys bringing up a cammand shell and requesting that I correct the missing HD in fstab and the only change I made to fstab was to comment out this line
# /dev/sdc1 /media/BackupManual ext3 defaults 0 2
and the system then booted successfully. The rest of the fstab was modified by the system I guess since I am the only user.

I cannot explain why there is no sda3 I mistyped and it should have read thus: "My objective for this box is to mount a 2nd 200GB SATA HD as sdb with 3 partitions that have been created and sdb1 already contains a backup copy of all data on sda(?) /home."

I had originally formated this sdb HD as a single partition and put all the /home data from sda(?) as a backup. So I asked gparted to shrink the partition sdb1to the current size and to create the other two partitions and this was successful.

Since I was not sure how to format the drive thinking I would learn the virtual box and run ME on it so knowing ME was fat32 I formated sdb2 to that format so that I can use some programs that run in Windows now and then after I move this box into my work studio but that is not important at this point.

The existing partitions on sda were created when I made a fresh install of 8.04 leaving the old install as a backup boot since I am traveling the wilderness of Linux with only the LUG and google to guide me, My eyesight has sunk so that I can no longer easily read a printed manual and I read everything on screen. I am just not very confident in getting it right.

I don't remember but I think I caused the 'extended' because I was familiar with fdisk from fat32 and that was a requirement. I believe /home is on the boot partition with /root.

Yes the system boots without stopping now after removing the line referring to sdc1.

Hope that clears things up Lee, thanks for the help.
herb






______________________________________________________________________________
Highland Lakes Linux User Group (HLLUG): http://www.hllug.org
HLLUG mailing list: //www.freelists.org/list/hllug

Other related posts: