SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I am about to change the partition scheme on my main working system (a Toshiba laptop FWIW). I have googled and searched and read the manual and mostly see the path I must follow - just looking for some warm and fuzzy feelings about it.
No need I think for full details, but it is currently dual boot Mandriva 2006 (80GB, ext3 full / tree, sda6) and Slackware 12.1 (12GB, ext3 full / tree, sda5), with two shared swaps. The Mandriva partition has recently been 85% full mostly from database usage, but I have reduced that to <50% and will get it even lower before attempting to resize.
What I plan to do is resize the Mandriva partition to about 30GB and subsequently migrate projects under /home/usernames/... to a new partition shared by Mandriva and Slackware installs. I will also share MySQL ../data/.. across distros, but that is another topic.
The main idea and concern is to try to keep the Mandriva partition intact and bootable if at all possible. I keep complete backups and admin notes, but it would still be more than a little painful to rebuild.
I acknowledge all the risks regarding backups and have those under control. I also have no issues using LILO to keep it all bootable - if the partition resize works correctly, and can handle it if my partitions are renamed in the process.
I plan to use parted from the Slackware 12.1 install to do the resizing of the Mandriva partition - my first time to downsize an ext3. I have googled and searched this forum and think I see the path to follow.
So - the main point of this post is to solicit comments from anyone who has used parted to successfully (or otherwise) downsize a working ext3 partition. Because the partition has been 85% full in the recent past I have concerns about fragmentation, but the parted docs say that it is smart enough to relocate blocks during the process - anyone know if this is reliable? Any other words of wisdom?
Because the partition has been 85% full in the recent past I have concerns about fragmentation, but the parted docs say that it is smart enough to relocate blocks during the process - anyone know if this is reliable? Any other words of wisdom?
The best way to defrag a partition is to copy the partition to backup using cp, format the partition, and cp the data back.
I always find parted a little too "intense" - especially late at night when I seem to do a lot of messing around with partitions.
IMHO, use the gparted liveCD - small and has a nice GUI that handles the filesystem as well as the partition underneath just by dragging the visualization of the partitions. Of course it merely uses libparted and sundry other tools under the covers, but is a really good tool for this sort of thing. Using a liveCD also obviates any concerns with screwing currently mounted partitions. As for the loader, can be fixed from the liveCD also (at least for grub), or you should be able to chroot into your new arrangement and re-install from there.
The best way to defrag a partition is to copy the partition to backup using cp, format the partition, and cp the data back.
Thanks jailbait, you are correct, but that is not much help with this situation.
And to be a bit more clear, I hope, I am not so much concerned with fragmentation on the partition in general, but with the fact that the resized partition will be smaller than the actual location of any file fragments that were located out near that 85% area and would be lost if not moved to a new location in the resized partition. parted is supposed to take care of that, but having never done so I am apprehensive.
Quote:
Originally Posted by syg00
I always find parted a little too "intense" - especially late at night when I seem to do a lot of messing around with partitions.
IMHO, use the gparted liveCD
HA! Sounds like Repo Man! (If you don't know what that means, rent the movie and enjoy!)
I have not used Gparted, but just grabbed it and burned to CD, will give it a try later. I tried Parted Magic a while back (on another project) and did not get the results I expected - hence my desire to use parted from the terminal.
As I stated, mostly I would like to keep my Mandriva partition useable without having to reinstall it. If I can resize and accomplish that I will do everything else with fdisk, unless Gparted wins me over completely...
Running gparted allows the user to perform many partitioning steps in sequence. Nothing gets executed until explicitly enabling gparted to start. That allows the user to sit and think about the to-do list just created.
I've used gparted many times to perform many operations in one session. I also endorse a backup of critical files before starting. Gparted seems to "just work" but the backup is always the best fail-safe action.
I grabbed Gparted and burned ISO to CD on another machine but it would not boot on the target laptop. I thought I just burned a coaster but nothing, including the Slackware 12.1 DVD will mount or boot (I installed on this drive from that disk just a couple of weeks ago). Just bad timing I guess...
Oddly though, it will play a video DVD, but fails to mount or boot data CD/DVD, "unable to read superblock".
Thanks for the comments on parted and Gpartd - guess I'll have to get back to it after sorting out the drive...
The drive is dead, I guess the timing was better than half way through an install though! I am an old guy, sort of , and of all the devices I have worked with since using paper tape and a real TTY to build my first Z-80 board, CD/DVD drives top the list of short MTBF. I have a stack of them...
Anyway, I decided to do my first PXE boot and got it working first try using Slackware 12.1 DVD media and the fine notes by Alien Bob - Thanks Bob! So network install will now be my first choice!
But after spending much effort, I have not been able to accomplish a PXE boot of Gparted. Their site has some notes about using it with PXE, but they actually make little sense, and I found a post from the maintainer (I think) that indicates that anything after 3.1.1 will not work PXE despite what the notes say, current is 3.7.2.
Similarly, I have also not been able to make a Gparted USB drive boot, also according to the instructions on the Gparted site. Bootable USB sticks are also new to me, but after much reading I don't think it should be this difficult. I'll have another go at it tomorrow.
Anyone with ideas, suggestions, moral support?
But, with the Slackware installer PXE boot working I can fall back to using parted from a terminal and get back to my original project - if I can remember what it was!
(And thanks for the MANY LQ pages I have read in the process!)
I finally managed to get Gparted to boot via PXE and had my first look at it. Familiar Fluxbox environment and nice looking tool!
I also have concluded that my box will not boot from USB stick - after spending the better part of a day on it... BIOS has a USB-FDD boot option but it ignores anything I throw at it, even a stick known to boot on another box.
So, I think I will forget about replacing the CD/DVD and make the change to a network managed installation... now where was I?
I will also end this thread here unless anyone wants to add comments on using Gparted, now that I can actually do it!
And I will also do a post tomorrow on booting Gparted via PXE to hopefully save someone from the grief I experienced... but all 'experience' is good!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.