Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
though once I execute the above, do I still need to
edit /etc/fstab and /etc/mtab, and if so, how?
Your commands look fine. Don't worry about /etc/mtab (see the man page for mount to understand why). The file /etc/fstab is a text file - all you should need to do is edit the /dev/sda5 or LABEL=u1 entry, with your favourite text editor, to specify ext4 rather than ext3 as the filesystem.
> Your commands look fine. Don't worry about /etc/mtab (see the man page for
> mount to understand why). The file /etc/fstab is a text file - all you should
> need to do is edit the /dev/sda5 or LABEL=u1 entry, with your favourite text
> editor, to specify ext4 rather than ext3 as the filesystem.
Thanks. Actually, when I execute "/sbin/mkfs.ext4 /dev/sda5"
(after unmounting /dev/sda5), I get the message:
/dev/sda5 is apparently in use by the system; will not make
a filesystem here!
What is the issue here?
Do I need to boot off the live CD in order to format a
partition, rather than boot off the OS on the actually
hard disk?
> Within code blocks, so it gets properly formatted, can you post
> the outputs of 'mount'
Code:
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1014540k,nr_inodes=253635,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
/dev/sda3 on / type ext4 (rw,relatime,seclabel,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda8 on /u4 type ext3 (rw,relatime,seclabel,data=ordered)
/dev/sda6 on /u2 type ext3 (rw,relatime,seclabel,data=ordered)
/dev/sda1 on /boot type ext4 (rw,relatime,seclabel,data=ordered)
/dev/sda7 on /u3 type ext3 (rw,relatime,seclabel,data=ordered)
gvfs-fuse-daemon on /run/user/generic/gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda5 on /u1 type ext3 (rw,relatime,seclabel,data=ordered)
> and your /etc/fstab file?
Code:
#
# /etc/fstab
# Created by anaconda on Fri Jul 13 15:42:02 2012
#
# 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=b171f170-086f-4b5d-b5ac-f132a6c6bed9 / ext4 defaults 1 1
UUID=d0b422d3-48ce-4989-9b3e-bc4262b989d1 /boot ext4 defaults 1 2
UUID=d3374b32-0a42-4d9e-859d-2ce24166e4e6 /u1 ext3 defaults 1 2
UUID=f88caee0-6516-4171-a1c9-551f18613e35 /u2 ext3 defaults 1 2
UUID=4032c16b-9709-4bc7-945d-71882572e3e8 /u3 ext3 defaults 1 2
UUID=4eb59a23-453a-4bc1-9ee2-41f853f593e1 /u4 ext3 defaults 1 2
UUID=76b37a42-2c6b-40fa-9126-80c9841998e3 swap swap defaults 0 0
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1014540k,nr_inodes=253635,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
/dev/sda3 on / type ext4 (rw,relatime,seclabel,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda8 on /u4 type ext3 (rw,relatime,seclabel,data=ordered)
/dev/sda6 on /u2 type ext3 (rw,relatime,seclabel,data=ordered)
/dev/sda1 on /boot type ext4 (rw,relatime,seclabel,data=ordered)
/dev/sda7 on /u3 type ext3 (rw,relatime,seclabel,data=ordered)
gvfs-fuse-daemon on /run/user/generic/gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
yet still, "/sbin/mkfs.ext4 /dev/sda5" yields the message:
Code:
dev/sda5 is apparently in use by the system; will not make a filesystem here!
The output of "fuser -vm /u1" is 158 lines long. Would you
like to see it?
The output of the fuser command would only be useful if it was executed after unmounting /u1.
I am thinking that there will be more success by trying the mkfs in single user mode or from a LiveCD. It would help ensure that nothing is using /dev/sda5.
The output of the fuser command would only be useful if it was executed after unmounting /u1.
Actually, those 158 lines of output from "fuser -vm /u1"
were with /u1 unmounted. /u1 was no longer in the output
of "df" or "mount".
Quote:
I am thinking that there will be more success by trying the mkfs in single user mode or from a LiveCD. It would help ensure that nothing is using /dev/sda5.
And that is exactly what I did. On to new problems.
My system now boots up in emergency mode:
Code:
Cannot open font file True
Welcome to emergency mode. Use "systemctl default" or ^D to enter default mode.
Give root password for maintenance (or type Control-D to continue_
When I type root password, all partitions are available except
for /u1 though i _can_ mount /u1 with the command:
Code:
mount -t ext4 /dev/sda5 /mnt/u1_tmp
What do I do now? Is this a grub issue?
The system does not behave as though any partitions were
damaged, all are readable by me.
Thanks again !
P.S. I did edit the /etc/fstab file changing /u1 from
ext3 to ext4:
Code:
# /etc/fstab
# Created by anaconda on Fri Jul 13 15:42:02 2012
#
# 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=b171f170-086f-4b5d-b5ac-f132a6c6bed9 / ext4 defaults 1 1
UUID=d0b422d3-48ce-4989-9b3e-bc4262b989d1 /boot ext4 defaults 1 2
UUID=d3374b32-0a42-4d9e-859d-2ce24166e4e6 /u1 ext4 defaults 1 2
UUID=f88caee0-6516-4171-a1c9-551f18613e35 /u2 ext3 defaults 1 2
UUID=4032c16b-9709-4bc7-945d-71882572e3e8 /u3 ext3 defaults 1 2
UUID=4eb59a23-453a-4bc1-9ee2-41f853f593e1 /u4 ext3 defaults 1 2
UUID=76b37a42-2c6b-40fa-9126-80c9841998e3 swap swap defaults 0 0
What is with those UUID numbers in /etc/fstab? That must be new
as I have never seen
those before.
It's possible the UUID for that partition has now changed but can you post the output before the maintenance mode prompt (?) as there should be some error or indication of why the system entered maintenance mode. Hopefully it's just because it couldn't find the old /u1 partition.
Does the system continue to boot OK when you exit maintenance mode?
The UUIDs can be helpful in situations where disks can be removed or added to a system. sda, sdb etc can get renamed but UUIDs remain the same. Personally I prefer to use LABEL= but it doesn't really matter.
The UUID for /dev/sda5 can be obtained with blkid:
It's possible the UUID for that partition has now
changed but can you post the output before the maintenance mode prompt (?) as
there should be some error or indication of why the system entered maintenance
mode.
The only message that was there long enough for me to read was:
"Cannot open font file True"
Quote:
Hopefully it's just because it couldn't find the old /u1 partition.
Does the system continue to boot OK when you exit maintenance mode?
It does not. The system just goes back into rescue mode.
Quote:
The UUIDs can be helpful in situations where disks can be removed or added to a
system. sda, sdb etc can get renamed but UUIDs remain the same. Personally I
prefer to use LABEL= but it doesn't really matter.
The UUID for /dev/sda5 can be obtained with blkid:
Code:
blkid -s UUID /dev/sda5
And that was the ticket. I used "blkid" to get the ID, edited
/etc/fstab with the new ID, and the system now boots fine!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.