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.
Hello,
Can I get some advice about repartitioning while keeping my current installation?
My current partition scheme is:
/dev/sda1 40GB ext3 (12.2 installation)
/dev/sda2 20GB ext4 (13.0 installation)
/dev/sda3 80GB ext3 (data)
/dev/sda4 2GB swap
They are all primary partitions. What I'd like to do is get rid of the 12.2 partition and use it to mount a /home partition of perhaps 5GB and then leave the rest for whatever I may want to do with it, such as testing a new distro or version of Slackware.
Can I just delete sda1 and use cfdisk to make two new partitions? What about making them primary or logical? Are there any issues that I should be aware of before going at it?
First, format /dev/sda1 as ext4, and mount it to temporary directory under Slack 13. Next, copy /home/* to /dev/sda1, backup this directory for sure and remove all subdirectories from /home (it should be empty directory), and then You can change the stable mountpoint in /etc/mtab for /dev/sda1 to /home directory. All this should be done as root, of course. After next reboot You should have /dev/sda1 mounted as /home with full users directories.
First be sure that your boot loader is using the 13.0 installation. If not, then make it so. When you installed 13.0, did you request lilo be written to the mbr? If so, then you are good. If not, then you may still be using it from the earlier install. lilo is in my distant memory since I've been using grub for a long time; so maybe it doesn't matter, but check it out before you get rid of your first install.
I think the safest thing to do is to change the partition type to 5 which is extended. Then you can make new logical partitions on it. It's risky to actually delete a partition. In the past I did that and all the partition numbers changed.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Something to be aware of - you currently have four primary partitions. That's the maximum you can have and it must also include any extended partition which may contain many logical partitions. I you wanted to create more partitions where slack12.2 is on /dev/sda1 you will have to delete that then create two (or more) logical partitions in the space it occupied. These will be /dev/sda5 and onwards meaning you will no longer has a /dev/sda1. This is due to the way extended partitions work and limits set into the system. The existing partitons /dev/sda2 - /dev/sda4 should retain their present names OK so you're mountings will be alright left as they are for them.
If you come unstuck with lilo after you have made any changes you can use the install disk to boot into your Slackware 13.0 install and fix things.Lilo should be OK though. However as the other posters point out it's something to watch out for.
Hello,
Can I get some advice about repartitioning while keeping my current installation?
My current partition scheme is:
/dev/sda1 40GB ext3 (12.2 installation)
/dev/sda2 20GB ext4 (13.0 installation)
/dev/sda3 80GB ext3 (data)
/dev/sda4 2GB swap
They are all primary partitions. What I'd like to do is get rid of the 12.2 partition and use it to mount a /home partition of perhaps 5GB and then leave the rest for whatever I may want to do with it, such as testing a new distro or version of Slackware.
Can I just delete sda1 and use cfdisk to make two new partitions? What about making them primary or logical? Are there any issues that I should be aware of before going at it?
Thanks, b.
Install boot-loader for slackware 13.
Probably you can't create more than four primary partition.Create extended partition,then logical partition.
Your partition number may be changed, so you may need to change boot loader configuration.
Thanks for all the responses. I've got some follow-up questions.
First, how do I check where the boot loader is installed?
Second, a couple of posters mentioned that the partition numbers might change... how can I determine if they will? And if they do, it will cause problems not only for the boot loader but also for my fstab, right?
I guess a third question might be, is it just easier to backup and start from scratch??
Thanks for all the responses. I've got some follow-up questions.
First, how do I check where the boot loader is installed?
Second, a couple of posters mentioned that the partition numbers might change... how can I determine if they will? And if they do, it will cause problems not only for the boot loader but also for my fstab, right?
I guess a third question might be, is it just easier to backup and start from scratch??
Since you aren't sure about the bootloader, boot into version 13.0 and reinstall the bootloader from there. I'm assuming that you are using LILO. In a terminal as root run
You can't tell if it would change them, but I just found out that you cannot just change the partition type to extended. It must first be deleted. But, you will not be writing the table until you remake the partition; so it will not change the numbers. I use fdisk; so can't give you cfdisk directions, but you delete sda1, then remake it and give it type '5' for extended, then make your logical partitions and then check what the table looks like. With fdisk, that is 'p' to print it out. Then write the table if it looks correct. Be sure to reboot before you do anything with sda5 or 6. It's good to reboot after changing the partition table.
No it is not easier to start from scratch. I'm sorry for the bad information I gave about changing that partition type without deleting it in my previous post. Also I forgot to say that the numbers will not change until the table is written; so remaking paritition sda1 solves the problem.
Edit: Another good thing to know. You can save your original table information and remake a partition table if you find it is broken. Redoing the partition table does not remove your data. So I do this and keep it on hand: fdisk -l > partition-table.txt. I write all those numbers on an index card, too. Then I can rewrite the table with those exact numbers and I actually did this once and was grateful to the one who had told me about it. I don't know how it works with cfdisk.
Last edited by ajlewis2; 10-23-2009 at 05:51 AM.
Reason: save the table info first
You might want to repartition with a Parted Magic lice CD: http://partedmagic.com/
This is a graphical partition manager that runs off a live CD. If your partitions change after deleting /dev/sda1 it will be shown on Parted Magic. You can then mount and chroot into your Slack 13 partition and change fstab and rerun lilo if you need to all from the Parted Magic live CD.
Thanks for the clarifications. I'm going to have to do a number of backups before I get into this. I'm still wondering if going in by scratch might be better since it'll give me the chance to make some changes that I'd like to have -- such as encrypted partitions for /home and the data that is currently on /dev/sda3.
For those keeping score at home, I finally did it and wow, was it painless. No need for any concern on my part. I deleted sda1 and made 3 new logical partitions of 18, 18 and 4 gigs. I reinstalled 13.0 on one of the 18s and upgraded to current and made the 4 my /home. The old 13.0 boots fine (ie no partition name changes) so good news all around.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.