LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 02-17-2011, 01:36 PM   #1
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 13.37 -32 Bit
Posts: 578

Rep: Reputation: 48
Is it safe to resize my Slackware partitions after removing my Mint 10 partitions?


Hello:

I've reached a point in my Slackware journey where I feel confident enough to remove my Mint 10 linux. It used to be my 'go to distro' when I trashed my Slackware installation. Now, I have Slax on a USB and I think that is enough.

Mint 10 occupies /dev/sda5 (root) and /dev/sda6 (home) while Slackware occupies /dev/sda7 (root) and /dev/sda8 (home).

If I delete the /dev/sda5 & /dev/sda6 partitions, can I very safely resize /dev/sda7 and /dev/sda8 to use the space freed up?

Thanks,
 
Old 02-17-2011, 01:40 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Quote:
can I very safely resize /dev/sda7 and /dev/sda8 to use the space freed up?
Always backup your data before resizing.

Kind regards
 
1 members found this post helpful.
Old 02-17-2011, 01:43 PM   #3
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,170

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I've had quite good luck using parted to re-size ext partitions, your mileage may vary. Back up your PC *before* you attempt deleting, re-sizing in the event that things go awry. Good luck.

http://www.gnu.org/software/parted/

http://gparted.sourceforge.net/livecd.php
 
1 members found this post helpful.
Old 02-17-2011, 01:55 PM   #4
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,252

Rep: Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631
I may be wrong but I believe you can only resize into adjacent partitions, so that may give you issues. LVMs make resizing a much more pleasurable experience but they obviously add another level of complexity to deal with.
 
1 members found this post helpful.
Old 02-17-2011, 02:39 PM   #5
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 608

Rep: Reputation: 109Reputation: 109
It's someone who noticed that our OP want to MOVE DOWN AND RESIZE these partitions?

Last edited by Darth Vader; 02-17-2011 at 02:41 PM.
 
Old 02-17-2011, 02:50 PM   #6
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 13.37 -32 Bit
Posts: 578

Original Poster
Rep: Reputation: 48
Hello:

I am waiting for my 'dd' back ups of /dev/sda7 & /dev/sda8 to complete.

Is the fact that sda5 & sda6 are before my Slackware partitions a problem?

Would it be better to, after my backups complete, delete all 4 of my linux partitions and then create 2 new ones and then restore from my back up, or, is this even possible from a 'dd' back up living on my external hard drive?

Thanks,
 
Old 02-17-2011, 03:02 PM   #7
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 608

Rep: Reputation: 109Reputation: 109
Well, that method can work if you use EXT2/3/4FS. If you use the condition that these new partitions are somewhat bigger than the original.

Create the new partitioning, DD it back and use resize2fs for resizing the filesystems in the right sizes.

Then, mount the target root partition and reconfigure it for the new partition layout. Enjoy!
 
1 members found this post helpful.
Old 02-17-2011, 03:22 PM   #8
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
I always backup the system partition (you call it root) as tar.gz file using the command such as:

tar czf /path/to/the/backup/directory/name_of_the_backup_file.tgz *

As for the data partition (you call it home) I always backup it as is on the external drive using the command such as:

rsync -av /source/directory /destination/directory

In the past I did backup of Windows XP system using dd command. The result wasn't satisfactory. When I tried to restore the system with dd command on the partition smaller than the original one Windows XP refused to work. On the other hand when I tried to restore it on the bigger partition then the original one I wasted some space because I wasn't able to resize that partition.

Linux can cause other problems. Assuming the system you backed up was on /dev/sda7 partition and the bootloader was installed on the same partition and you try to restore it on /dev/sda5 partition the result will be a mess.

So I suggest to use tar to backup system partition and rsync to backup data partition.
 
1 members found this post helpful.
Old 02-17-2011, 03:23 PM   #9
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 13.37 -32 Bit
Posts: 578

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by Darth Vader View Post
Well, that method can work if you use EXT2/3/4FS. If you use the condition that these new partitions are somewhat bigger than the original.

Create the new partitioning, DD it back and use resize2fs for resizing the filesystems in the right sizes.

Then, mount the target root partition and reconfigure it for the new partition layout. Enjoy!
Sorry Darth, but I have some questions.

My Slackware partitions are ext4 and so is my back up partition on my external USB drive.

Actually, I am so confused right now that I can't formulate the questions!

I've got to think about all of this.

Thanks for the food for thought.
 
Old 02-17-2011, 04:00 PM   #10
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,252

Rep: Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631
If you create a successful `dd` backup you can delete the other partitions and create two new ones of satisfactory size (though they must be at least as big as they are now) and restore the filesystem onto the new partitions. However, when you first boot, the filesystem has not been resized so although it is living in a bigger partition you will not have access to more space. Luckily ext4 filesystems can be resized using resize2fs as stated, so you can then resize the filesystem to take up the rest of the room in each partition and then you're golden. However since the partition names may be different you may have to modify /etc/fstab and /etc/lilo.conf (don't forget to run lilo) to accommodate the new device names.

If you do make a mistake or can't figure it out, you should be able to reinstall Slackware on the resized partitions and get at any data stored in the dd backups by mounting the images and pulling any files you need.
 
1 members found this post helpful.
Old 02-17-2011, 04:10 PM   #11
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 608

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by Robert.Thompson View Post
My Slackware partitions are ext4 and so is my back up partition on my external USB drive.
Wait a second! You do an partition to partition backup? That's very bad thing. You should do the dump to an backup file.
 
1 members found this post helpful.
Old 02-17-2011, 04:24 PM   #12
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 13.37 -32 Bit
Posts: 578

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by Darth Vader View Post
Wait a second! You do an partition to partition backup? That's very bad thing. You should do the dump to an backup file.
Hello Darth:

I don't understand.

I have an external USB hard disk on which there are 2 partitions: 1 ntfs & 1 ext4.

I did my back ups like this where /dev/sdb2 is mounted at /tmp/USBdrv:
Code:
# dd if=/dev/sda8 of=/tmp/USBdrv/slackhome.img bs=64k
# dd if=/dev/sda7 of=/tmp/USBdrv/slackroot.img bs=64k
What should I have done?

Thanks,
 
Old 02-17-2011, 04:33 PM   #13
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 608

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by Robert.Thompson View Post
I have an external USB hard disk on which there are 2 partitions: 1 ntfs & 1 ext4.

I did my back ups like this where /dev/sdb2 is mounted at /tmp/USBdrv:
Code:
# dd if=/dev/sda8 of=/tmp/USBdrv/slackhome.img bs=64k
# dd if=/dev/sda7 of=/tmp/USBdrv/slackroot.img bs=64k
That's the right thing. I was worried that you do an DD from /dev/sdeX to /dev/sdeX...
 
1 members found this post helpful.
Old 02-17-2011, 04:36 PM   #14
tacticalbread
Member
 
Registered: Jan 2011
Location: IN
Distribution: Arch x64 multilib
Posts: 79

Rep: Reputation: 13
if /tmp/USBdrv/ is where your external is mounted, then that's just fine.

I had Ubuntu on /dev/sda1, Windows on /dev/sda2, and slackware on /dev/sda3, and I deleted my Ubuntu partition, and moved the other two over, and I've had no problems. (Although I have no /dev/sda1 :P)
 
1 members found this post helpful.
Old 02-17-2011, 04:49 PM   #15
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 13.37 -32 Bit
Posts: 578

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by T3slider View Post
... Luckily ext4 filesystems can be resized using resize2fs as stated, so you can then resize the filesystem to take up the rest of the room in each partition and then you're golden. However since the partition names may be different you may have to modify /etc/fstab and /etc/lilo.conf (don't forget to run lilo) to accommodate the new device names...
Thank you.

Do I need to down load and install resize2fs before doing any of this? If so, I will have to do new back ups, right?

Also, am I to use the installed 'KDE Partition Manager' to do all this?

Thanks,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Safe to resize used partitions? pickarooney Linux - Software 6 12-25-2006 06:10 AM
How do I resize partitions? watha Suse/Novell 4 09-28-2006 10:29 PM
Hoe safe to resize partitions? heffo_j Linux - Hardware 2 07-02-2006 10:04 AM
Resize Partitions mramos Red Hat 4 09-12-2005 09:32 AM
are partitions safe? cilcit Linux - Newbie 5 08-29-2005 10:10 AM


All times are GMT -5. The time now is 05:56 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration