Won't boot after /windows/C mount fails

The mount fails because I removed the harddrive containing that and more partitions. Now I can only get into emergency mode. I want to boot without that secondary harddrive because I need it somewhere else.
Do I have to manually edit fstab to get this working? What if I want to re-add the harddrive later, then I have to do all that manually again (i.e: make a backup of my fstab file as it is now).
There has to be a better way right?

/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-Corsair_Force_GS_12277912000018820035-part1 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-Corsair_Force_GS_12277912000018820035-part2 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part1 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part3 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Editing manualy is the quickest way now. Just put a # character in front of those lines.

#/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part1 /windows/C           ntfs-3g

That is allways easy to remove later. You then do not realy need a backup of the file. but it never harms having one of course and in fact IMHO you should allready have one made with your normaly backup sequence :wink:

(BTW did you realy copy/paste that fstab list from a terminal window, e.g. by doing a

cat /etc/fstab

in between the CODE tags here. It is malformed as you show it.)

On 08/10/2012 10:56 AM, Maxxi12 wrote:
> There has to be a better way right?

not that i am aware of…well…maybe after you do the below then if
after booting you then plug in the NTFS partitions you might be
surprised that they are automatically made available…

so, your fstab has two lines showing NTFS partitions:


/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part1 /windows/C
ntfs-3g    users[etc etc snip]
/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part3 /windows/D
ntfs-3g    users[etc etc snip]

try (as root) just putting one of these # at the beginning of each like,
like:


# /dev/disk/by-id/ata-[etc etc]
# /dev/disk/by-id/ata-[etc etc]

and, then reboot…does that work?

if not you are gonna need to give us some more into, like:

  • what is your operating system and version?

  • if using a desktop environment please name it and give version

  • please show us the terminal input/output from


df -hlT
sudo /sbin/fdisk -l
sudo cat /boot/grub/menu.lst
uname -a

copy/paste the in/output back to this thread using the instructions
here: http://goo.gl/i3wnr


dd

Yes it worked, thank you. I just think that users like my father who has ~10 hard drives which he constantly switches around would be very lost with such a solution.

There are ways to do this, but not by first switching around and getting stuck, First looking into the possibilities, then testing, etc. is a better way IMHO :wink:

On 2012-08-10 10:56, Maxxi12 wrote:
>
> The mount fails because I removed the harddrive containing that and more
> partitions. Now I can only get into emergency mode. I want to boot
> without that secondary harddrive because I need it somewhere else.
> Do I have to manually edit fstab to get this working?

Yes. Just add a comment mark (#) at the start of each line.

> What if I want to
> re-add the harddrive later, then I have to do all that manually again

Just remove the comment mark.

Alternatively, you can add the option “nofail”, like this:


/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J90Z208665-part1 /windows/C           ntfs-3g
users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8,nofail   0 0

That way, when the partition fails to mount boot will continue, and when you plug the disk back on
it will be mounted at boot again.

The disadvantage is that if it fails to mount for any reason, you will not get any error message.


Cheers / Saludos,

Carlos E. R.
(from 12.1 “Asparagus” GM (bombadillo))