Well I finally got all apps installed (except xforms, xBasic) now I need to resolve the next hurdle. I have the following left after my mess was fixed.
/dev/sda1 boot/efi 300mib
/dev/sda2 swap 6GB
/dev/sda2 15.1 root 120GB
/dev/sda4 ntfs data 760GB
/dev/sda5 ------------------>old 15.1 badly broken 130GB
/dev/sda6 back-up files 70GB
My root sda3 has only 12 GB left on it and 97% is stuff in home. I would prefer not to just move it and create links to other drives because I have to at each boot go into dolphin - supper user and give permission to open each link before apps trying to work with data can see the partitions. Nothing on sda5 is needed now so I need to remove it from grub menu and make it my new home partition.
Question:
Do I need to boot from USB live to do this or can I do the move using the live session?
copy all home files (including hidden files/folders, etc.) to sda5
boot from a liveCD or similar and backup and edit fstab to point to the new partition. You probably can do this by booting in safe/rescue mode, but I’m not sure.
delete old home folder after checking all is OK, else revert the fstab change.
I’m assuming your root is sda3, you listed sda2 twice.
wow! getting ahead of myself here. sdar5 has has old 15.1 in it don’t I have to remove it from grub boot menu first?
Then reformat so no errors exist on it
Then move files to it??
Found a post by ‘oldcpu’ about using grub-customizer so installed that to see if I could remove the unwanted boot items in grub and it gave amount of gtk+ depreciated errors but it did generate a grub2 menu with the correct entries. so I am now able to work on replacing the home1 to hold my real home folder. I will be back when I have it ready to make it the active home.
From the above and the top post I conclude current system partition sits on /dev/sda3 and home is a subdirectory of /. You want to move the contents of folder /home to partition /dev/sda5 and subsequently mount /dev/sda5 to /home. I have done this several times and always proceeded as follows (assuming file system on /dev/sda5 was already adjusted by YaST partitioner):
Boot a live system from USB and create empty folders /old and /new.
mount /dev/sda3 to /old and /dev/sda5 to /new.
Mirror data by running ‘rsync -a /old/home/ /new/’.
rename /old/home to /old/home.save
create /old/home
add /dev/sda5 to file /old/etc/fstab by appending UUID=<actual UUID of sda5> /home ext4 defaults 0 2
reboot
Keep directory /old/home.save until you verified everything works as expected.
yep I messed up before I got your post but think it is fixable.
original had /home mounted on root (/)
in home was /home/me … me replaced by my real login name.
as super user I used yast to unmount ‘oldlinux’ partitition, and reformat it ext4
mounted 'oldlinux to run/media/linux/me
copied /home/me folder to ‘oldlinux’ and relabeld 'oldlinux (sda5) as me2
but to view me2 contents I need to supply root password so think this is not the way I should have done this.
as root i have been able to verify that contents of /home/me exactly match /dev/sda5 ‘me2’ which I think is basically what rsync would have done.
I don’t have enough space to create /home/old /home/new while still using /home/me
/home/me is 89.6GB
space left on root where /home/me is < 13GB
Linux 15.1 flash has <20GB
/dev/sda5 has 130GB - 89GB = 41GB
As near as I can tell sda3 with root+home is 118G , /home uses 89G and free is 13G so root is using 16G
System at his point is working and all packages needed are installed so really don’t want to re-install root
Ideally, I’d like to have root as it is backed up somewhere safe with home located on sda5
?? can make a folder on sda5 called home and move current contents into that folder in sub-folder called ‘me’
and attach that /dev/sda5 as /home ??
this time I will wait for answer before blindly proceeding
No. You have to understand that /home is not a folder on the partition/filesystem where your homedir resides, rather a mountpoint on / where that fs is mounted. So, to use some partition/fs for /home, you would have to copy your homedir itself there, from your example “me” and not /home/me. The latter would, once mounted, give /home/home/me .
Running a live system and creating empty folders /old and /new stick will not occupy space at all. Command ‘mkdir /old’ in the live system running will create an empty folder on your USB stick. A subsequent ‘mount /dev/sda3 /old’ will not occupy any space either, but make your data sitting on partition /dev/sda3 available in folder /old. See also: https://superuser.com/questions/1163429/linux-filesystem-mount-point-vs-folder. Please read carefully and try to understand.
Try to undo the mess created already. Post the current status. Post what you intend to achieve. Always specify the partition the file system is sitting on and and the mount point used.
?? can make a folder on sda5 called home and move current contents into that folder in sub-folder called ‘me’
and attach that /dev/sda5 as /home ??
Your wording confuses me. I presume you want to copy the contents of /home on partition /dev/sda3 to partition /dev/sda5.
For doing so it’s best to use the live system and proceed as already detailed above. You need not create a folder /me on /dev/sda5.
When running your original system at /dev/sda3 and mounting partition /dev/sda5 through /etc/fstab using /home as mount point will care for that.
Here’s what I did on my previous laptop, when I put a second 128 GB SSD in it. Before the below I create /dev/sdb1 on the new SSD with ext4. FWIW I backupped the content of /home to an external drive before I did this
Boot in single user mode ( add “1” to the boot parameters ). This can only use the root account
mkdir /newhome
mount /dev/sdb1 /newhome
cp -a /home/* /newhome
rm -rf /home/*
edit /etc/fstab and change the device for mounting to ext 4 /dev/sdb1 ( UUID can also be found in the /dev folder ) on /home
reboot
Done. /home is now the mountpoint for /dev/sdb1. To explain why I remove the content of /home in the above: it would still occupy space, but you would not see the content since the new situation uses the mountpoint, so the actual content of the /home folder on / would be invisible.
But what I don’t get, is why you chose your own way of partitioning. To do so, one IMNSHO needs to understand the basics.
Furthermore, I’d like to ask you to copy output from a terminal window, incl the prompt and command, instead of typing it here, and wrap CODE tags around it, the # in the editor layout options.
Yes I want to copy contents of /dev/sda3/home to /dev/sda5/home
as can be seen my last failed attempt is sitting on /dev/sda5 occupying 89G but the contents are still existing in my home folder.
can erase /dev/sda5 and start over using 15.1 live usb
so now have copies of home one mounted sda5 to /newhome & one copy externally to sdb3 mounted /bkuphome
can’t do rm -rf /home/* or edit etc/fstab till I can get single user mode fstab is currently
But what I don’t get, is why you chose your own way of partitioning. To do so, one IMNSHO needs to understand the basics.
System started out years ago as opensuse 11.1 and upgraded live all the way to leap 15.1 then everything went wrong at every turn. So I replaced an old partition with 15.1 fresh to solve things and have a clean system. I had always had home as part of root and always wished I had of made it separate. And having done that and got 15.1 correct and working figured I had better move home to it’s own space on it’s own partition. All along I had been keeping a duplicate partition such that if things got bad as they did this time I could still boot into old partition and it has saved me especially this time.
So in the beginning I had redhat 7 on sda3 , windows on sda 4, nothing on sda5 or sda6 as they were part of sda3 space. Then came windows crash and almost lost all my data. decided to try opensuse 11.1 and split sda3 into smaller partition making sda5 for 11.1 and at each new system I upgrade I install 11.1 to sda3 upgrade that to 11.2 when it works ok i upgrade 11.1 on sda5 to 11.2 and so on. This time the upgrade seemed to be real bad. so replaced 15.1 on sda3 with fresh rather than upgrade. And decided to just do everything clean with a home partition the way it should have been done in the first place.
Back to the task at hand.
Managed to get into single user mode but only way to edit seemed to be with vim tried to use vi and it started vim instead. uuid seems different at each boot for mounted drives so no way to make sure I edit fstab right so closed vim and tried using 15.1 on flash to edit fstab but there again have no way to know uuid of partitions do they change each time (doesn’t sound right as then fstab wouldn’t know how to use). Don’t know how to use vi or vim, on flash 15.1 live could load etc/fstab into kate but didn’t know uuid to make changes. Wish I could find my notes on using bylabel in etc/fstab but that is years old.