Corrupt fstab

I have tried to edit the fstab of my original Ubuntu12.04 but somehow it got corrupted!
[spoiler]s# /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).

proc /proc proc nodev,noexec,nosuid 0 0

/ was on /dev/sdb1 during installation

UUID=86fe3809-17a6-412c-be0a-250f6f29fa41 / ext4 errors=remount-ro 0 1

swap was on /dev/sda5 during installation

swap was on /dev/sdb2 during installation

UUID=03b9f227-9f5c-4abc-a50b-74ecc1590f44 none swap sw 0 0

Mounted Drives

Mounting Drive1 ext4

UUID=d5e1db61-b980-4624-801c-e0546b288b8f /media/Drive1 ext4 defaults 0 0

Mounting Drive3 ext4

UUID=1e72a175-851f-43c3-a251-241d0e3800a7 /media/Drive3 ext4 defaults 0 0

Mounting EXT-01 NTFS 3TbHd

UUID=94

72C6BD72C6A37A /media/EXT-01 ntfs-3g defaults,windows_names,locale=en_GB.utf8 0 0# Mounting EXT-02 NTFS 3TbHdUUID=fece8a70-7f38-4ad2-aaf3-49a69a8fb91e /me
#dia/Drive2 ext4 defaults 0 0

UUID=fece8a70-7f38-4ad2-aaf3-49a69a8fb91e /me#dia/Drive2 ext4 defaults 0 0

Ubuntu12.04 OLD boot (sda1)

UUID=86fe3809-17a6-412c-be0a-250f6f29fa41 / ext4

swap (sda2)

UUID=03b9f227-9f5c-4abc-a50b-74ecc1590f44 none swap sw 0 0

Unsure(sdb1)

UUID=1e72a175-851f-43c3-a251-241d0e3800a7 /media/Drive3 ext4 defaults 0 0

Kubuntu12.04 boot (sdc1)

UUID=201d2f3e-f865-4912-b852-99b5b24f3457 / ext4

swap (sdc2)

UUID=718377f7-8759-44ad-888d-e0fb3f91c5e4 none swap

Ubuntu12.04 NEW boot (sdc5)

UUID=bcb8b27e-dd9e-4c09-a259-48cf4f937c9e / ext4

Manjaro boot (sdc6)

UUID=01244934-31e1-4ed9-b961-78b5f04e1f6a / ext4

Unsure (sdd1)

UUID=d5e1db61-b980-4624-801c-e0546b288b8f /media/Drive1 ext4 defaults 0 0

EXT01 3Tb External Storage (sdf1)

UUID=9472C6BD72C6A37A ntfs-3g defaults,user,locale=en_GB.utf8 0 0

EXT02 3Tb External Storage (sdg1)

UUID=73CDB94066F320F1 ntfs-3g defaults,user,locale=en_GB.utf8 0 0# UUID=3E9E5F1B0F3E4B8D /media/EXT-02 ntfs-3g defaults,windows_names,locale=en_GB.utf8 0 0

Ubuntu12.04 OLD boot (sda1)

UUID=86fe3809-17a6-412c-be0a-250f6f29fa41 / ext4

swap (sda2)

UUID=03b9f227-9f5c-4abc-a50b-74ecc1590f44 none swap sw 0 0

Unsure(sdb1)

UUID=1e72a175-851f-43c3-a251-241d0e3800a7 /media/Drive3 ext4 defaults 0 0

Kubuntu12.04 boot (sdc1)

UUID=201d2f3e-f865-4912-b852-99b5b24f3457 / ext4

swap (sdc2)

UUID=718377f7-8759-44ad-888d-e0fb3f91c5e4 none swap

Ubuntu12.04 NEW boot (sdc5)

UUID=bcb8b27e-dd9e-4c09-a259-48cf4f937c9e / ext4

Manjaro boot (sdc6)

UUID=01244934-31e1-4ed9-b961-78b5f04e1f6a / ext4

Unsure (sdd1)

UUID=d5e1db61-b980-4624-801c-e0546b288b8f /media/Drive1 ext4 defaults 0 0

EXT01 3Tb External Storage (sdf1)

UUID=9472C6BD72C6A37A ntfs-3g defaults,user,locale=en_GB.utf8 0 0

EXT02 3Tb External Storage (sdg1)

UUID=73CDB94066F320F1 ntfs-3g defaults,user,locale=en_GB.utf8 0 0
[/spoiler]

Now, it looks like when I edit it in Kubuntu and then try to save it, it duplicates itself???

Why is it doing this and how can I fix it?

Now, it looks like when I edit it in Kubuntu and then try to save it, it duplicates itself???
That could be because you do not have the right to edit that file. Hence it goes into a 'Save As' mode. Try to be root when you open the file.

While in Dolphin, I press [F4] which brings up a small terminal window at the bottom of Dolphin with the current path to the folder I’m in where the fstab for Ubuntu12.04 (original install) is, but it just brings up a blank file.
I try and edit it with

gksudo kate fstab

So, I have to just open it by clicking on it and telling it to open in Kate.
After editing it, Kate comes up with;
[URL=http://imageshack.com/photo/my-images/30/viq2.png/]
http://imageshack.com/scaled/medium/30/viq2.png

When I said it duplicates itsef, I meant inside itself,not a backup.

Try editing it from an Ubuntu LiveCD … to rule in/out an issue with kate.

Anything called “kate” was bound to get uppity every now and again :wink:

Tried but no joy!
I tried editing the lines out at first but the problem was still there so I decided to remove the lines completely but that still didn’t solve the problem, one of which was the 3TbHd’s. So I tried switching off the Hd’s then booting back up but there is still a problem as it still boots to the recovery screen (the colourful one with the menu).

Don’t know if this is anything but I just opened fstab again and at the top it said ‘The file was not closed appropriately. Do you want to recover the data?’

Why is it saying that when I edited it OK and then saved it no problem while using a ‘Live CD/DVD’?

Dunno … what did you open it with when it gave that warning ? … kate ?

Yes, Kate

If it’s working … tell kate NO :slight_smile:

Just booted into the other Ubuntu12.04 I installed when I created the multi-boot and used gedit to look at the fstab and I didn’t get the error warning.
So I still can’t understand why it won’t boot properly?

What makes you think it was fstab in the first place ?

Have you run fsck on the broken system/partition ?

I was messing with fstab, adding the 3TbHd’s to it.
How do I run ‘fsck’?

So, what actually happens when you try to boot each OS now?

Not run fstab on the original 12.04 drive as not sure how.
Other OS’es fine. When I select the original OS loads of info flies up the screen, too fast to copy, then it shows the screen as mentioned above.
I can’ boot into the OS as it keeps doing that.

Any idea if it keeps a boot up log that I can copy the info from?

too fast to copy, then it shows the screen as mentioned above.

What screen mentioned above ?

Are you saying when you select “Ubuntu 12.04” at the GRUB menu, it actually boots (Ubuntu 12.04 (recovery mode)) instead ?

Yes, some kind of recovery mode, one where there’s a colourful menu, GUI style.

In the OS that controls GRUB … what’s the contents of:

gedit /boot/grub/grub.cfg
kate /boot/grub/grub.cfg

[spoiler]#

DO NOT EDIT THIS FILE

It is automatically generated by grub-mkconfig using templates

from /etc/grub.d and settings from /etc/default/grub

BEGIN /etc/grub.d/00_header

if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default=“0”
if [ “${prev_saved_entry}” ]; then
set saved_entry=“${prev_saved_entry}”
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z “${boot_once}” ]; then
saved_entry=“${chosen}”
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n “${have_grubenv}” ]; then if [ -z “${boot_once}” ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
set locale_dir=($root)/boot/grub/locale
set lang=
insmod gettext
fi
terminal_output gfxterm
if [ “${recordfail}” = 1 ]; then
set timeout=-1
else
set timeout=10
fi

END /etc/grub.d/00_header

BEGIN /etc/grub.d/05_debian_theme

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 75,75,75; then
clear
fi

END /etc/grub.d/05_debian_theme

BEGIN /etc/grub.d/10_linux

function gfxmode {
set gfxpayload=“${1}”
if [ “${1}” = “keep” ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ “${recordfail}” != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ “${linux_gfx_mode}” != “text” ]; then load_video; fi
menuentry ‘Ubuntu, with Linux 3.2.0-54-generic’ --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
linux /boot/vmlinuz-3.2.0-54-generic root=UUID=201d2f3e-f865-4912-b852-99b5b24f3457 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-54-generic
}
menuentry ‘Ubuntu, with Linux 3.2.0-54-generic (recovery mode)’ --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
echo ‘Loading Linux 3.2.0-54-generic …’
linux /boot/vmlinuz-3.2.0-54-generic root=UUID=201d2f3e-f865-4912-b852-99b5b24f3457 ro recovery nomodeset
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-3.2.0-54-generic
}
submenu “Previous Linux versions” {
menuentry ‘Ubuntu, with Linux 3.2.0-53-generic’ --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
linux /boot/vmlinuz-3.2.0-53-generic root=UUID=201d2f3e-f865-4912-b852-99b5b24f3457 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-53-generic
}
menuentry ‘Ubuntu, with Linux 3.2.0-53-generic (recovery mode)’ --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
echo ‘Loading Linux 3.2.0-53-generic …’
linux /boot/vmlinuz-3.2.0-53-generic root=UUID=201d2f3e-f865-4912-b852-99b5b24f3457 ro recovery nomodeset
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-3.2.0-53-generic
}
menuentry ‘Ubuntu, with Linux 3.2.0-52-generic’ --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
linux /boot/vmlinuz-3.2.0-52-generic root=UUID=201d2f3e-f865-4912-b852-99b5b24f3457 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-52-generic
}
menuentry ‘Ubuntu, with Linux 3.2.0-52-generic (recovery mode)’ --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
echo ‘Loading Linux 3.2.0-52-generic …’
linux /boot/vmlinuz-3.2.0-52-generic root=UUID=201d2f3e-f865-4912-b852-99b5b24f3457 ro recovery nomodeset
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-3.2.0-52-generic
}
}

END /etc/grub.d/10_linux

BEGIN /etc/grub.d/20_linux_xen

END /etc/grub.d/20_linux_xen

BEGIN /etc/grub.d/20_memtest86+

menuentry “Memory test (memtest86+)” {
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
linux16 /boot/memtest86+.bin
}
menuentry “Memory test (memtest86+, serial console 115200)” {
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos1)’
search --no-floppy --fs-uuid --set=root 201d2f3e-f865-4912-b852-99b5b24f3457
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}

END /etc/grub.d/20_memtest86+

BEGIN /etc/grub.d/30_os-prober

menuentry “Ubuntu, with Linux 3.2.0-53-generic (on /dev/sda1)” --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root=‘(hd0,msdos1)’
search --no-floppy --fs-uuid --set=root 86fe3809-17a6-412c-be0a-250f6f29fa41
linux /boot/vmlinuz-3.2.0-53-generic root=UUID=86fe3809-17a6-412c-be0a-250f6f29fa41 ro quiet splash vga=791 $vt_handoff
initrd /boot/initrd.img-3.2.0-53-generic
}
menuentry “Ubuntu, with Linux 3.2.0-53-generic (recovery mode) (on /dev/sda1)” --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root=‘(hd0,msdos1)’
search --no-floppy --fs-uuid --set=root 86fe3809-17a6-412c-be0a-250f6f29fa41
linux /boot/vmlinuz-3.2.0-53-generic root=UUID=86fe3809-17a6-412c-be0a-250f6f29fa41 ro recovery nomodeset
initrd /boot/initrd.img-3.2.0-53-generic
}
menuentry “Ubuntu 12.04 NEW, with Linux 3.8.0-30-generic (sdc5) (on /dev/sdc5)” --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos5)’
search --no-floppy --fs-uuid --set=root bcb8b27e-dd9e-4c09-a259-48cf4f937c9e
linux /boot/vmlinuz-3.8.0-30-generic root=UUID=bcb8b27e-dd9e-4c09-a259-48cf4f937c9e ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.8.0-30-generic
}
menuentry “Ubuntu 12.04 NEW, with Linux 3.8.0-30-generic (recovery mode) (sdc5) (on /dev/sdc5)” --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root=‘(hd2,msdos5)’
search --no-floppy --fs-uuid --set=root bcb8b27e-dd9e-4c09-a259-48cf4f937c9e
linux /boot/vmlinuz-3.8.0-30-generic root=UUID=bcb8b27e-dd9e-4c09-a259-48cf4f937c9e ro recovery nomodeset
initrd /boot/initrd.img-3.8.0-30-generic
}

END /etc/grub.d/30_os-prober

BEGIN /etc/grub.d/30_uefi-firmware

END /etc/grub.d/30_uefi-firmware

BEGIN /etc/grub.d/40_custom

This file provides an easy way to add custom menu entries. Simply type the

menu entries you want to add after this comment. Be careful not to change

the ‘exec tail’ line above.

END /etc/grub.d/40_custom

BEGIN /etc/grub.d/41_custom

if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi

END /etc/grub.d/41_custom

[/spoiler]

  1. What is listed and in what order at the GRUB menu ?

  2. What is the output from:

sudo blkid
  1. Which partition is the broken Ubuntu on ?