how to fix fstab of one Ubuntu from older Ubuntu in multi-boot system
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.
how to fix fstab of one Ubuntu from older Ubuntu in multi-boot system
I have 6 os installed (MBR HDD) on my PC (2 windows and 4 Linux disros), but let me make the long story short. I will say that I have 4 Os's (2 windows, Ubuntu 14.04 and Ubuntu 16.04 installed). After I copied the Ubuntu 16.04 /home data to external HDD, I manipulated the HDD (repartitions) using disk management and MiniTool Partition Wizard in MS windows. I intentionally deleted the /home and /swap partitions of one Ubuntu 16.04; using those windows tools. I ended up booting to one windows only from the 4 OS's, so I used boot-repair USP flash to to fix the grub. all 4 OS's are in the grub I can log to one Ubuntu but not the other it try to log and comes back to login screen(because I deleted /home). Using Ubuntu 14.04 ( instead of live CD) I created new home and swap partitions for Ubuntu 16.04 and edited its fstab using the method recommended by , Steve Stites in: http://www.linuxquestions.org/questi...estion-631370/ . I still can't log to Ubuntu 16.04. please help to fix this, Abo sal
Since you already have the boot repair software, the best thing to do would be to run it again and select the option to Create BootInfo Summary. This will give a link at the end to post here so that members can review drive/partition and boot file info. You modified partitions and thus changed UUID's.
Thank you all for your help Steve Stites – The 2 /etc/fstab files are the same _after some modification_as the UUIDs on the
corresponding partitions, if you meant by the 2 /etc/fstab - ( fstab's Ubuntu 16.04 + fstab's Ubuntu
14.04.) - I think each distro has its own fstab (independent). Of course Ubuntu 14.04 fstab matches
its home UUID after boot repair. For Ubuntu 16.04 I recreated new home and swap and added the
new UUID to fstab of 16.04 using installed Ubuntu 14.04 not live CD; like you explained before in
your post(..gedit /sparrow/etc/fstab..). Of course I commented the old UUID, because they don't
exist any more. I think I used your method once but using live CD and I think it worked. Now I
don't have have live CD but I have another Ubuntu that I can create new /home and new swap using
geparted and edit fstab of the other Ubuntu. Colorpurple21859 I see the 3 users (created before) in the login screen when trying to log (no new
user). I can log as gust. Does new directory means new home ?? regards
Colorpurple21859 [/U][/B]I see the 3 users (created before) in the login screen when trying to log (no new
user). I can log as gust. Does new directory means new home ?? regards
Linux keeps a table of usernames with a corresponding number for each username. In the various directories and files the owner is represented by a number not a name. If you have different users in your two Ubuntu systems or if you created the users in different orders on the two systems then the user numbers for some or all users will be different on the two Ubuntu systems. In that case copying the /home directory from one Ubuntu to another would create an unusable system.
yeah what jailbate said but in short hand all of your users have to have same username = same UID and group = same GID in every and all distos if you are sharing the /home especially or it will have conflicts.
find it
Code:
id -u username
id -g username
id -G username
id username
because I deleted /home). Using Ubuntu 14.04 ( instead of live CD) I created new home and swap partitions for Ubuntu 16.04 and edited its fstab using the method recommended b
when you created the new home was it /home or /home/<username>? and even then, when you create the new /home/<username>/ you will still have to change ownership of the new /home/<username> to the user that owned the /home/<username> that you had deleted.
Last edited by colorpurple21859; 07-09-2017 at 03:20 PM.
To avoid confusion let me ask a simpler question I have Ubuntu 16.04 installed on mbr HDD. The partitions on the hdd are:
/root /dev/sda1
/home /dev/sda2
/swap /dev/sda3
NTFS /dev/sda3
The users are: A and B.
if I used live CD and deleted the home and swap partitions,kept /root intact.I repartitioned the HDD. How can I add new home + swap and edit fstab. thnakx
why are you deleting the partitions? if you are needing more space in you home and swap is where you are taking it from then just resize. to delete two partitions and just re-establish them seems redundant.
too bad you cannot just log in root with your system being split that just removes the need to use a DVD or USB Stick - logging in root keeps you on the / (sda1) side then you can do what ever you want to sda2 thru N
but now can this be?
Code:
/swap /dev/sda3
NTFS /dev/sda3
NTFS and swap partition on same partition?
but to just answer your question.
Boot DVD
when you are in a login off DVD open a terminal blkid to get the proper address for safety, then cfdisk /dev/sda2 delete /dev/sda3 delete - then take that new space and split it up again then when you have everything the way you want it, then have cfdisk 'write' that to the disk. I believe that formatting will then be need if using cfdisk.
Now the need for home/user lifts its head, so then you're back to adding that home/user with proper permissions UID and GID on the directory, and their is plenty of how to do that in this thread.
you can delete the partitions with Gparted too if the DVD os has gparted. and do that same thing with Gparted. GParted can easily do the formatting for you after you've re done your partitions.
Not forgetting New swap, New Home Partitions --
you can use old school /dev/sda3 /home - until you get into your original OS and change it to UUID's -- that will work - or
sudo blkid to get UUIDs - I usually open two terminals one for notes
UUID and such notes and the other terminal for the work to be done.
still DVD OS just terminal -> mount /sda1 to DVD /tmp
-----------------------
Steve Stites[/QUOTE]
jailbait I don't know what u meant by "would create an unusable system".grub lists all operating systems, I can use 3 of them (2 windows and one Ubuntu). I meant copying data I downloaded or created in desktop or downloaded to NfTS partition. Every distro has its own home directory. Eventually all of my data ends up to NTFS partition, because they can be accessed by windows and Linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.