Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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 04:24 PM.
Reason: to be more clear
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.