Repairing the FSTAB
Solution 1
Many thanks to the anonymous contributor. Booted using my LiveUSB, mounted my internal HDD, opened Terminal and navigated to the HDD directory (cd /media/1eaa73bd-8758-4899-a4d2-2a992a2ea762/etc
) and entered the gksudo command (gksudo gedit fstab
). Overwrote the FSTAB file as suggested (with a few tweeks) and I am now in my own /home again!
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=1eaa73bd-8758-4899-a4d2-2a992a2ea762 / ext4 errors=remount-ro 0 1
UUID=f1d24581-7850-4a0f-93cd-7e4d24dade1d none swap sw 0 0
UUID=201821D41821AA2C /media/Winstuff ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
UUID=A0C41DD1C41DAA94 /media/MasterDisk ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
UUID=0F26083D43D41058 /media/MyDocuments ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
Solution 2
It should look something like this:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sda6 /home ext4 errors=remount-ro 0 1
/dev/sda1 /media/Winstuff ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
/dev/sdb1 /media/Windows ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
/dev/sdb5 /media/docs ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
/dev/sdc1 /media/Elements ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0 0 0
/dev/sdd1 / vfat errors=remount-ro 0 1
Related videos on Youtube
Infintyyy
Updated on September 18, 2022Comments
-
Infintyyy over 1 year
I recently changed my /home to another partition and after it caused problems (I had it formatted as NTFS) I wish to change it back to it's original location. I changed the FSTAB listing for /home to use the UUID for the ext4 partition but it still causes problems. On startup I get "unable to mount /dev/sda5" and "unable to mount /dev/sdc5". I push 'S' to skip and get to the login screen where I can sometimes log into my session and sometimes the screen goes black then back to the login screen. I am now making this post using the Guest account.
BLKID gives the following info:
/dev/sda1: LABEL="Additional Windows Stuff" UUID="201821D41821AA2C" TYPE="ntfs" /dev/sda5: UUID="f1d24581-7850-4a0f-93cd-7e4d24dade1d" TYPE="swap" /dev/sda6: UUID="1eaa73bd-8758-4899-a4d2-2a992a2ea762" TYPE="ext4" /dev/sdb1: LABEL="Master Disk" UUID="A0C41DD1C41DAA94" TYPE="ntfs" /dev/sdb5: LABEL="My Documents" UUID="0F26083D43D41058" TYPE="ntfs" /dev/sdc1: LABEL="Elements" UUID="CAB427ABB4279949" TYPE="ntfs" /dev/sdd1: LABEL="UBUNTU11-10" UUID="19EC-2249" TYPE="vfat"
- SDA1 is in physical position of IDE0 and so has GRUB and some other stuff on it.
- SDA5 is my Swap partition.
- SDA6 is my Ubuntu install and where I'm trying to return my /home to.
- SDB1 is in physical position of IDE1 and has my Windows install.
- SDB5 is where I moved /home to for a short time.
- SDC1 is a USB drive.
- SDD1 is my LiveUSB install drive with 11.10 on it.
Currently my FSTAB file looks like this:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sdc6 during installation UUID=1eaa73bd-8758-4899-a4d2-2a992a2ea762 / ext4 defaults 0 1 # swap was on /dev/sdc7 during installation UUID=92f46648-958f-40a1-b96b-607081c063a7 none swap sw 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0 /dev/sdb2 /home ntfs defaults 0 0 /dev/sdb1 /media/sdb1 ntfs defaults 0 0 /dev/sda5 /media/sda5 ntfs defaults 0 0 /dev/sdc5 /media/sdc5 ntfs defaults 0 0 /dev/sdb5 /media/sdb5 swap defaults 0 0 /dev/sdd1 /media/sdd1 vfat defaults 0 0
Is there a way to completly start from scratch without stuffing the system or will I have to manually remount the affected drives? I don't mind re-installing if I have too, but who enjoys that? Once fixed, I think I will use simlinks to merge my 'My Documents' and /home!
I am a Windows veteran but a Linux numpty!
I do have 'Storage Device Manager' installed.
-
Caesium over 12 yearsCan you edit your question to include the contents of fstab? We can probably fix it up for you :)
-
Anonymous over 12 yearsI always take backup of my /etc/fstab file.
-
Mikerobenics over 12 yearsUnless I misunderstand, /dev/sda6 should have mount point / and not /dev/sdd1 (the memory stick). Home would then be a directory within /dev/sda6 and not a partition of its own (therefore no /home entry in fstab at all).
-
Infintyyy over 12 yearsTried to repair my FSTAB file using the info kindly provided above, however I am unable to gain sufficient access to the file to modify it. At present I am unable to log into my profile. The Guest account does not have modify access rights so attempted to use my LiveUSB to gain access. Mounted my HDD ok but the FSTAB file is read only so still unable to save any changes (get a warning when I tried to save over the file saying I do not have the rights). I would try from Windoze but I can only inport from EXT4 into windoze not export back to EXT4. Any more ideas?
-
Anonymous over 12 years@AndrewHeath, use
gksudo gedit /etc/fstab
to get the proper privileges. Alternatively in GRUB (the bootloader) you can boot into single-user mode.