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.
Fedora 17, 64bit
Ubuntu 12.04 desktop 64bit
HD 160G
Ubuntu 12.04 has been already installed on the HD first, several days ago, taking up the whole disc. Later I added/installed Fedora 17 selecting the "Shrink" option and saved the bootloader on /dev/sda1 to make them dualboot. Installation is successful with dulaboot option. Unfortunately by mistake I retained insufficient space for Ubuntu 12.04, now only about 100M left when it is up.
There is plenty of space on /home of Fedora 17. Is there any easy way to shrink /home of Fedora 17 and then adding the spare space to / (/dev/sda1) of Ubuntu 12.04? TIA
well, ubuntu works, it's just got a lot of stuff in /home?
if so, copy your current stuff from ubuntu's /home to fedora's /home, maybe to a temp location. after you make the copy, you delete what's in ubuntu's /home(from fedora) BEFORE mounting fedora's /home as /home for both of them.
with the stuff in ubuntu's /home cut and moved, it'd be... enough space?
just an idea, take what you will. / does need to be very big, usually. while in a live distro, not while ubuntu is running.
$ mount /dev/ubuntu-partition /mnt/ubuntu
$ mount /dev/fedora-partion /mnt/fedora
$ mkdir /mnt/fedora/xtra
$ mv /mnt/ubuntu/usr /mnt/fedora/xtra
$ mv /mnt/ubuntu/home /mnt/fedora/xtra
do this for all the large folders.
then on the ubuntu mount make symbolic links to /mnt/fedora/xtra. of course you'll need a fstab entry.
that's the general idea. off-load all large folders to another partion. then create symbolic links. / doesn't ever have to be very "big".
well, ubuntu works, it's just got a lot of stuff in /home?
if so, copy your current stuff from ubuntu's /home to fedora's /home, maybe to a temp location. after you make the copy, you delete what's in ubuntu's /home(from fedora) BEFORE mounting fedora's /home as /home for both of them.
with the stuff in ubuntu's /home cut and moved, it'd be... enough space?
then you can mount the fedora /home on ubuntu, it'd mean nothing would be written to ubuntu home, taking up more space, you'd have a bit more time to work, to gather a new hard disk to back stuff up to.
This is a spare HD NOT for production. I'll use it testing Cloud running on Fedora 17 and Ubuntu 12.04 respectively. There is not much data nor much work done on both OS. The only work I did several day before was installing rotation desktop on Ubuntu 12.04. It is now working.
Today I installed Fedora 17 on the freed space by shrinking Ubuntu 12.04 which was taking up the entire HD. Installation went through w/o much problem. Unfortunately I made a mistake on calculating the shrinked space to be retained by Ubuntu 12.04.
The target on this rectification is mainly for me to learn. I think I have to split the job into 2 sections
resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on /dev/mapper/vg_fedora17-lv_home to 2359296 (4k) blocks.
The filesystem on /dev/mapper/vg_fedora17-lv_home is now 2359296 blocks long.
# lvreduce -L 10G /dev/vg_fedora17/lv_home
Code:
WARNING: Reducing active logical volume to 10.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv_home? [y/n]: y
Reducing logical volume lv_home to 10.00 GiB
Logical volume lv_home successfully resized
# fdisk -l
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000d52d
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 8263679 4130816 83 Linux
/dev/sda2 296333310 312580095 8123393 5 Extended
/dev/sda3 8263680 9287679 512000 83 Linux
/dev/sda4 9287680 296331263 143521792 8e Linux LVM
/dev/sda5 296333312 312580095 8123392 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/mapper/vg_fedora17-lv_swap: 10.3 GB, 10267656192 bytes
255 heads, 63 sectors/track, 1248 cylinders, total 20054016 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg_fedora17-lv_home: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg_fedora17-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 4111 MB, 4111466496 bytes
255 heads, 63 sectors/track, 499 cylinders, total 8030208 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1d459011
Device Boot Start End Blocks Id System
/dev/sdb1 * 0 1320959 660480 0 Empty
/dev/sdb2 164 1299 568 ef EFI (FAT-12/16/32)
/dev/sdb3 1348 3587 1120 0 Empty
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb1: 676 MB, 676331520 bytes
255 heads, 63 sectors/track, 82 cylinders, total 1320960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1d459011
Device Boot Start End Blocks Id System
/dev/sdb1p1 * 0 1320959 660480 0 Empty
/dev/sdb1p2 164 1299 568 ef EFI (FAT-12/16/32)
/dev/sdb1p3 1348 3587 1120 0 Empty
Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/live-osimg-min: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Rebooted PC to start Fedora 17
# fdisk -l
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000d52d
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 8263679 4130816 83 Linux
/dev/sda2 296333310 312580095 8123393 5 Extended
/dev/sda3 8263680 9287679 512000 83 Linux
/dev/sda4 9287680 296331263 143521792 8e Linux LVM
/dev/sda5 296333312 312580095 8123392 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/mapper/vg_fedora17-lv_swap: 10.3 GB, 10267656192 bytes
255 heads, 63 sectors/track, 1248 cylinders, total 20054016 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg_fedora17-lv_home: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg_fedora17-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 4111 MB, 4111466496 bytes
255 heads, 63 sectors/track, 499 cylinders, total 8030208 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1d459011
Device Boot Start End Blocks Id System
/dev/sdb1 * 0 1320959 660480 0 Empty
/dev/sdb2 164 1299 568 ef EFI (FAT-12/16/32)
/dev/sdb3 1348 3587 1120 0 Empty
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb1: 676 MB, 676331520 bytes
255 heads, 63 sectors/track, 82 cylinders, total 1320960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1d459011
Device Boot Start End Blocks Id System
/dev/sdb1p1 * 0 1320959 660480 0 Empty
/dev/sdb1p2 164 1299 568 ef EFI (FAT-12/16/32)
/dev/sdb1p3 1348 3587 1120 0 Empty
Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/live-osimg-min: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.