LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-14-2008, 03:46 PM   #1
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Tips, tricks or comments using parted?


Hi all,

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?

All comments, thoughts and prayers appreciated.
 
Old 11-14-2008, 04:00 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by astrogeek View Post

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.

-----------------------
Steve Stites
 
Old 11-14-2008, 04:41 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 11-14-2008, 06:08 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by jailbait View Post
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 View Post
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...

Thanks.
 
Old 11-14-2008, 06:21 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
I'll endorse a gparted live cd.

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.
 
Old 11-15-2008, 01:40 AM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
CD/DVD drive has decided to fail...

Bummer...

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...
 
Old 11-17-2008, 01:56 AM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
PXE boot of Slackware, but no joy with Gparted...

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!)
 
Old 11-18-2008, 04:06 AM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263

Original Poster
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Smile Gparted now booting PXE!

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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Torsmo Tips & Tricks Slum Linux - Software 3 12-27-2005 07:04 PM
IRC tips/tricks? ValidiusMaximus Linux - Software 8 07-25-2005 02:56 PM
Slackware tips and tricks monkeymartin Slackware 3 11-12-2003 04:17 AM
Tips and Tricks Westdog976 LQ Suggestions & Feedback 8 07-14-2003 12:24 PM
Tips and Tricks Section trickykid LQ Suggestions & Feedback 1 06-22-2001 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration