LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2014, 04:10 PM   #1
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Rep: Reputation: 1
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?

Last edited by Birdman48; 08-21-2014 at 04:14 PM.
 
Old 08-21-2014, 04:53 PM   #2
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
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
 
Old 08-21-2014, 05:52 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,523

Rep: Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648
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
 
Old 08-21-2014, 06:20 PM   #4
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
using those commands I get "mount.bin: unknown filesystem type 'swap'"
 
Old 08-21-2014, 07:00 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Do both of your drives have grub on them? If so you probably need to change their order in bios
 
Old 08-21-2014, 07:11 PM   #6
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
I don't think so. I changed their order anyway and I get the same response after using mount.
 
Old 08-21-2014, 07:16 PM   #7
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
oh wait. I didn't save BIOS settings lemme try that again

Yeah, same thing happens

Last edited by Birdman48; 08-21-2014 at 07:18 PM.
 
Old 08-21-2014, 07:34 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,278

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
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
 
Old 08-21-2014, 08:00 PM   #9
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
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.
 
Old 08-21-2014, 08:13 PM   #10
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
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

Last edited by Birdman48; 08-21-2014 at 08:27 PM.
 
Old 08-21-2014, 08:21 PM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Are you booted to the hdd or usb?
 
Old 08-21-2014, 08:22 PM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If you have 2 linux drives then there will be 2 /etc/fstab files.
 
Old 08-21-2014, 08:37 PM   #13
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 112

Original Poster
Rep: Reputation: 1
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

Last edited by Birdman48; 08-21-2014 at 08:41 PM.
 
Old 08-21-2014, 08:56 PM   #14
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
It's going to be under /media if it's mounted.
Have you tried your File Manager?
 
Old 08-22-2014, 08:42 PM   #15
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,523

Rep: Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648
Quote:
Originally Posted by Birdman48 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can' edit fstab in rescue mode amolina Linux - Newbie 2 06-23-2008 05:04 AM
FC7 cannot edit /etc/fstab in single mode leiw Linux - Newbie 3 12-21-2007 04:23 AM
help in single user mode - cannot write fstab Shady_Creeper Slackware 2 02-14-2007 09:15 AM
cannot edit fstab in SELinux active mode eldraque Fedora 1 01-19-2006 03:38 AM
Edit a file in single-user mode ricardocastro Linux - Software 2 02-26-2002 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration