LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need to edit /etc/fstab but cannot get into single user mode (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-edit-etc-fstab-but-cannot-get-into-single-user-mode-4175515840/)

Birdman48 08-21-2014 05:10 PM

need to edit /etc/fstab but cannot get into single user mode
 
I was trying to get my second HD to auto-mount and edited /etc/fstab. Must have done it wrong because now the system won't boot. I get the splash screen and I can get into GRUB, but all the advice online says to edit the kernel line and reboot. I have tried editing the line " linux /boot/vmlinuz... quiets showopts" with " 1" at the end and with " single" at the end and then F10 to boot. It doesn't take me into single user. Is there any other way I can get back into /etc/fstab so I can delete what I did. I just want my computer back. Could I use a live CD or the install CD I used to install openSuse?

Birdman48 08-21-2014 05:53 PM

I am now trying to use my install disk and rescue mode. What now. I want to comment out the line I added to /etc/fstab

jlinkels 08-21-2014 06:52 PM

Create a directory in your root directory tree.
Mount the original disk
Edit fstab.
Code:

mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
cd /mnt/sda1
nano etc/fstab

If you don't have /mnt, use somting different, /media or /home

jlinkels

Birdman48 08-21-2014 07:20 PM

using those commands I get "mount.bin: unknown filesystem type 'swap'"

EDDY1 08-21-2014 08:00 PM

Do both of your drives have grub on them? If so you probably need to change their order in bios

Birdman48 08-21-2014 08:11 PM

I don't think so. I changed their order anyway and I get the same response after using mount.

Birdman48 08-21-2014 08:16 PM

oh wait. I didn't save BIOS settings lemme try that again

Yeah, same thing happens

yancek 08-21-2014 08:34 PM

Quote:

using those commands I get "mount.bin: unknown filesystem type 'swap'"
If you used sda1 as in the example, then that is not the correct partition. Try another, run fdkisk -l to find out what other partitions you have which might have your filesystem

Birdman48 08-21-2014 09:00 PM

Now we're getting somewhere. My partition is on sda3, so I can see my stuff now. Only where is that fstab file? When I go vi /etc/fstab this is not the same file.

Birdman48 08-21-2014 09:13 PM

Here's what this fstab file looks like.

/dev/root /ext2 defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

The one I edited looks different. Is this the one and only? Does something look wrong? I think I'm looking at the /etc/fstab on the disk - not the one I wan t to fix

EDDY1 08-21-2014 09:21 PM

Are you booted to the hdd or usb?

EDDY1 08-21-2014 09:22 PM

If you have 2 linux drives then there will be 2 /etc/fstab files.

Birdman48 08-21-2014 09:37 PM

Im boot to the HD. How do i find the other fstab file? (the one I messed up?) I can mount either HD but I think the /etc/fdisk I'm looking for might be in the root partition which I cannot get into

EDDY1 08-21-2014 09:56 PM

It's going to be under /media if it's mounted.
Have you tried your File Manager?

jlinkels 08-22-2014 09:42 PM

Quote:

Originally Posted by Birdman48 (Post 5225083)
Now we're getting somewhere. My partition is on sda3, so I can see my stuff now. Only where is that fstab file? When I go vi /etc/fstab this is not the same file.

It is not /etc/fstab.
It is /mnt/sda3/etc/fstab
Meaning etc/fstab below the point where you mounted sda3. There is no slash in front of etc.
But you'd better use the absolute path.

jlinkels


All times are GMT -5. The time now is 01:49 AM.