LinuxQuestions.org
Help answer threads with 0 replies.
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 07-18-2016, 08:31 PM   #1
sunnygill
LQ Newbie
 
Registered: Jul 2016
Posts: 4

Rep: Reputation: Disabled
Red hat not booting after formatting second hard


Hi,

I was running red hat Linux 7 on my vmware. Initially there was only hard disk (sda).For learning Fdisk, I added a second hard disk (sdb), format it partprobe, than mkfs.ext4, mount it with a mount point on my desktop , but after restart , Now I am not able to boot up its throwing error " Welcome to emergency mode!After logging in type journalctl -xb .......give root password for maintenance.

same thing happned with my second machine as well.



Please help.
 
Old 07-18-2016, 09:28 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,817

Rep: Reputation: 609Reputation: 609Reputation: 609Reputation: 609Reputation: 609Reputation: 609
What did you add to /etc/fstab ?
 
Old 07-19-2016, 01:56 AM   #3
sunnygill
LQ Newbie
 
Registered: Jul 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
As far I remember, I added full path than than /dev/sdb1 than deault, 0, 0
 
Old 07-19-2016, 02:42 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
There are several possible errors

1 - typographic error in the fstab file
2 - the mount point doesn't exist (and may be due to a typeographic error)
3 - the device sdb may not have a partition table (since you are learning fdisk, you might have forgotten to save it).
4 - the mkfs may have been done on /dev/sdb and not /dev/sdb1 - which would have wiped out the partition table

The easiest thing is to comment out the fstab entry and reboot.

Experiment with fdisk/mkfs/fsck... and manually mount the filesystems you expect.
 
Old 07-19-2016, 03:00 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,362

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
You borked something, likely in fstab. Comment out the line and reboot to get back into your OS. Once there, verify the drive partitioning looks correct, edit your fstab so it's correct, and then use "mount -a" to attempt to mount all disks in fstab to their proper places. If you get an error, investigate and fix it, and only reboot once it's working correctly.
 
Old 07-19-2016, 03:43 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,986

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
Quote:
with a mount point on my desktop
SElinux might be stopping a boot ( security check )
/home/YourUserName/Desktop/MountPoint

is owned by "your user name"

also the "Desktop" folder is more decoration than a real folder

try using the already existing

/mnt/YourPartition
 
Old 07-19-2016, 05:19 PM   #7
sunnygill
LQ Newbie
 
Registered: Jul 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi memebers,

Same problem again.

Please find the /etc/fstab file below edited by me:
#
# /etc/fstab
# Created by anaconda on Wed Jul 20 00:02:57 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=4b2cd685-b9d0-4fc4-8cb1-a2985932a501 / ext4 defaults 1 1
UUID=276d1a6b-86d4-4597-b60a-92fb81588a69 /boot ext4 defaults 1 2
UUID=b75f38b1-bd64-43c9-8680-b09e6a65a431 swap swap defaults 0 0
/dev/sdb1 /mnt/test ext4 default 0 0


Only the last entry was made by me to add sdb1.
It was working even after I mount it.
I was able to see it in df -h.
than I make entries in /etc/fstab and rebooted, it didnt work.

Last edited by sunnygill; 07-19-2016 at 05:24 PM. Reason: to be more clear
 
Old 07-19-2016, 05:55 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Does /mnt/test exist after boot?

You might do a "ls -l /dev/disk/by-uuid" show after a boot (with the /dev/sdb1 commented out of the fstab).

Also seeing the output of "cat /proc/partitions" wouldn't hurt either.

These will confirm the existence of the partition tables.

Last edited by jpollard; 07-19-2016 at 05:59 PM.
 
Old 07-19-2016, 06:18 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,362

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
Quote:
Originally Posted by sunnygill View Post
Hi memebers,

Same problem again.

Please find the /etc/fstab file below edited by me:
#
# /etc/fstab
# Created by anaconda on Wed Jul 20 00:02:57 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=4b2cd685-b9d0-4fc4-8cb1-a2985932a501 / ext4 defaults 1 1
UUID=276d1a6b-86d4-4597-b60a-92fb81588a69 /boot ext4 defaults 1 2
UUID=b75f38b1-bd64-43c9-8680-b09e6a65a431 swap swap defaults 0 0
/dev/sdb1 /mnt/test ext4 default 0 0


Only the last entry was made by me to add sdb1.
It was working even after I mount it.
I was able to see it in df -h.
than I make entries in /etc/fstab and rebooted, it didnt work.
Again, after you make the change in /etc/fstab, you should unmount it and then run "mount -a" to test the actual fstab entry before rebooting. This will protect you against typos and other formatting errors.

Your line needs to say "defaults", not "default". I'm not sure if that's enough to cause it to barf on boot, but testing it with "mount -a" before rebooting would verify.
 
Old 07-19-2016, 07:28 PM   #10
sunnygill
LQ Newbie
 
Registered: Jul 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
changing to "defaults", from "default" solved the issue.
Uhhff, Never though Such a small mistake can make system fail to boot up.

Thanks a lot to everyone.
Being new to Linux, It give me a lot of confident to have guys like you!
 
  


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
LXer: Red Hat powers cloud-scale DevOps with the general availability of Red Hat Cloud Suite and Red Hat OpenStack Platform 8 LXer Syndicated Linux News 0 04-20-2016 05:20 PM
Upgrading Red Hat 9 To Fedora 3 - Partitioning & Formatting abcolson Fedora - Installation 1 02-08-2005 05:30 PM
Red Hat 9 CD not Booting... Joelseph Linux - Newbie 10 01-15-2004 06:54 AM
Red hat 9.0 not booting up nagakiranp LinuxQuestions.org Member Success Stories 2 07-22-2003 01:03 PM


All times are GMT -5. The time now is 01:17 PM.

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