one of my PCs has it’s home partition on an extended partition looks at Ubuntu.
Now I wanted to install openSUSE, but I can’t use that home partition, because it’s not a primary one.
I want that home partition to stay, everything else will get wiped.
fdisk -l
Gerät boot. Anfang Ende Blöcke Id System
/dev/sda1 * 2048 616755199 308376576 83 Linux
/dev/sda2 616757246 625141759 4192257 5 Erweiterte
/dev/sda5 616757248 625141759 4192256 82 Linux Swap / Solaris
/dev/sda2 is my extended partition and has one logical partition (/dev/sda3 => home).
How can I convert or move /dev/sda3 to a primary partition (ext4) so that openSUSE can use it?
Theoretically the following should be possible, no?
Delete all but /dev/sda2
Make new primary partition with same size as /dev/sda3, let’s say /dev/sda4
dd if=/dev/sda3 of=/dev/sda4
… several hours later …
Delete /dev/sda2
Install openSUSE and change home partition to /dev/sda4 and say no format
Successfully changed distribution without losing your home
I would test it, but I’m afraid to lose my home…
If I could I would back my data up and do a complete new install, but I can’t. So please don’t tell me I should just back up my data.
Consider that openSUSE, when doing a new installation, is not going to reuse anything, but try to make room for its self. I suggest you need to do a custom partition, remove sda1, and create a new sda1 for swap, a new sda3 (before sda2 I guess) for root / and then just mount and do not format sda5 for /home. There is no reason openSUSE can not use a logical partition for home. You can place grub into the MBR or generic boot code in the MRB and mark Primary Partition sda3 as the boot partition. In any event, you just got to take manual control of the partition creation before you can install openSUSE.
But now when I think about it… isn’t that the template that the installer creates?
That would mean that this ain’t my current partition and assuming that fdisk -l doesn’t show my home partition, does that mean I have no seperate home partition?
You are severly mixing up things. You listing shows that you have:
. sda1 as a primary partion fit for a Linux file system.
. sda2 as an extended partition. Strange here is that it’s type is 5 (Extended) and not f (W95 Ext’d (LBA)) as usual here.
. sda5 is a logical partition it is given a type for Swap.
When you say that there is a functioning Linux on this setup, that can only be one file system contaning all of your data (system and personal on /home) and one swap partition. Finish.
So your remark:
/dev/sda2 is my extended partition and has one logical partition (/dev/sda3 => home).
contains a lot of nonsense:
. there is no sda3
. there is no separate partition for /home at all.
Please make up your mind and try to get grip on your situation. Because we can not give any useful help when we know only contrary information.
And as this one shows no logic from begin (the title included) to the end, I guess that everybody who even glances through untiil the end, will not find anything to bork his ystem.
BTW, if you want to sve evrything that is in your present /home directory, copy it somewhere else (USB stick or so). It can be copied back then after you did a new install.
In case you do then a complete new install, in the installer, go for changing whatever partition proposal is made. Somewhere down there you can say somehing like “use the whole disk”. This is to let the installer know that it should disregard all partitioning that is on the disk. It will then propose something that will be OK (including a separate /home partition ).
1: Make careful notes of the beginning, end, size of the partition that you want to preserve.
2: Delete all partitions, leaving an empty partition table (but don’t save the changes yet).
3: Create the partition that you want in exactly the right place and size. If fdisk does not cooperate, it has some features in the advanced commands that might help.
4: If you are completely satisfied, then save the results. If you screw up in the middle, then exit without saving the changes, and nothing has been lost.
I don’t actually recommend this. Your post is sufficiently confused, that I doubt you will be able to get it right. And you really should backup first anyway, just in case you mess up.
Another, equally risky method - design your own partition table with a hex editor, then use “dd” to put it in place.
On Sat, 29 Dec 2012 19:16:02 +0000, nrickert wrote:
> And you really should backup
> first anyway, just in case you mess up.
Yes, this, 100x this. And of course, once it’s backed up, there’s no
need to muck about with the partition table, just create the new
partitions you want and restore the backup.
Yup, I mixed it up terribly. My bad.
I didn’t pay attention when I first looked at the partition table during the openSUSE install process.
Hmm, then I guess there’s nothing I can do.
There are of course a number of things you can do, but none of them make sense without a backup of your important data.
A backup of important data is essential weather making partition changes or not.
I would check through my previous backups on other disks and delete what is no longer needed, you may be surprised by how much space becomes available for backups.
I would then go through /home and see what it is I do actually want to keep, it may not be as much as you think.
There are inexpensive options available for backing up to USB.
Once you have done this you could resize sda1 and create a partition in the free space (it would be sda3 and not in disk order), use it as a data partition and copy data that is in the category of “I would like to keep this, but I didn’t back it up because I don’t realy need it.” then delete sda1, sda5 then sda2 and create new partitions to suit yourself. You have the important backups, you can now make a mistake and it does not mater.
But my preferred option, with the backups made, would be to delete all partitions on the disk and start again.