LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to Move and utilize root /boot and Swap dir to temporary location? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-move-and-utilize-root-boot-and-swap-dir-to-temporary-location-762449/)

SHARPY 10-16-2009 02:48 PM

Is it possible to Move and utilize root /boot and Swap dir to temporary location?
 
I'll start by explaining what my system layout currently is.

I have Fedora 11 X64 installed on my system, it is an HP Dv9380ca laptop. My system has 2 hdd /dev/sda /dev/sdb. During the setup i set my home directory to reside on /dev/sdb. After booting i realized that my root and swap partition are part of a volume group name vg_sharpfed and are set in fstab as:

/dev/mapper/vg_sharpyfed-lv_root / ext4 defaults 1 1
/dev/mapper/vg_sharpyfed-lv_swap swap swap defaults 0 0

-----------------------------------------------------------

Output of Fdisk -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1aecda8d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 14593 117013441 8e Linux LVM


My /dev/sda2 partitions is 100gigs and set as an LVM. Essentially what i am getting at is, if it's possible to temporarily copy / /boot and swap to my second partition, edit grub if needed and fstab to mount to the temp locations, format sda to ext4 create partitions for / /boot and swap partitions, then copy back the original directories edit required fstab to mount the original locations and no longer have them contained in a Logical volume.

Is it possible to do this at all? If so what method is best.

Thanks

r3sistance 10-16-2009 03:06 PM

Swap shouldn't be a problem, as there is functality to create swap partitions around, and if sda2 is an LVM then you can resize it and add the Swap within the LVM. /boot can't exist within an LVM I am afraid and grub itself would need to be reconfigured (possibly reinstalled) to see another location for /boot as to the current directory. You can make a back-up of the /boot configuration and copy it back later if that's what your getting at but this may not correctly refer to your new set-up if you are creating new partitions and moving everything around. backing up the data you want to keep and reinstalling from scratch, unless you have ALOT of data would probably be a less painful experience (even tho it sounds like a more painful one...).

SHARPY 10-16-2009 03:30 PM

So essentially it is a more tedious process then a simple reinstall...I guess that is my best option...Well thank you for your quick response, and i'm going to go with you backup/reinstall suggestion.

rkski 10-17-2009 02:05 AM

First, is there any particular reason why you don't want to stick with the LVM2 (which is the default install). It will give you flexibility in expanding your / filesystem in the future by adding drives/partitions.
As said in previous post it is much easier just to reinstall if you don't want the LVM rather than doing all that temporary copying, especially if it's a fairly fresh install. Luckily your home is a separate drive so you won't lose your personal settings. Just use your current /home during the new install.


All times are GMT -5. The time now is 02:26 PM.