Oh lots to catch up on.
This week’s project was migrating my server’s OS to another partition.
I’m running Fedora 36 on an old Intel PC. That’s another story about my $100 media server. But anywho, I’d originally had the main drive split into multiple small Partitions for Linux Distro hopping, but have since done that more on my aging laptop. I’ve settled into having Fedora 36 running on the server pushing PLEX out to multiple Roku’s around the house. The media is actually on a couple of other drives that are 1TB and 3TB each. So the OS drive is 650GB but the OS was taking up a larger partition than needed and I’ve been wanting to move some storage type stuff off the media drives. So long project was to migrate the Fedora OS into a smaller partition and then move my storage data (mostly a local copy of Google drive and where I keep linux ISOs) off the media drive to the large partition on the primary drive.
Okay I thought this was going to be either really easy or I was going to crap out and have to reinstall the OS and get PLEX working again. It was kinda in between.
I shut her down and booted up from a live USB of a Fedora installer so I was using the same system. I created the necessary directories and mounted the two Partitions. I then found a website that have me the rsync command I needed. #find this later#. Getting the files copied over took a little while but then the fun started.
So now that the OS was relocated I had to get grub to boot it up. I tried a few complicated strategies but finally remembered I had a cheat sheet for doing chroot into Fedora. So I set up the mounts and did a chroot into the new partition filesystem. Once in I rebuilt the fstab and ran grub-mkconfig to update grub.cfg.
# Mount drives needed to /rescue
mount /dev/sdb6 /newfedora
# mount boot partition to /rescue/boot if needed
mount /dev/sdb8 /newfedora/boot
# Mount system directories
mount -t proc proc /rescue/proc
mount -t sysfs sys /rescue/sys
mount -o bind /dev /rescue/dev
mount -t devpts pts /rescue/dev/pts
mount –bind /etc/resolv.conf /rescue/etc/resolv.conf
# and finally chroot in
chroot /newfedora
So my media server is back up. I had some house cleaning such as getting PLEX folders fixed as I decided to change up some naming schemes. Not terribly difficult and hopefully worth the effort. I left the old system in place as backup while I tested this out. Now that it’s ran a week I’ll be clearing out that old partition and moving data around. It’s kinda a moot point cause sometime this year I plan to upgrade the entire tower. The old girl is really old. I had looked into installing some virtual machines on her and realized she wasn’t capable. No VTx in the firmware at all. So I’ll probably get a whole new tower soon and move the drives over.