Tool to change partition from primary to extended without prior deleting?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Tool to change partition from primary to extended without prior deleting?
Reason: Solaris mangled the partition table, the old extended partition is now of the type 1f (unknown type) and fdisk refuses to change that back without deleting. Or do I dare deleting and re-creating the old partition scheme by hand, hoping all will be well then?
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Right now I'm not in front of the crash victim. From memory it looks now like this: (I changed /dev/hda1 back to linux, /dev/hda2 stayed solaris and I changed /dev/hda3 back to FreeBSD)
Code:
...
/dev/hda4 1f (unknown)
Extended partitions up to and including /dev/hda9 are gone, of course.
testdisk is very good for this sort of thing. I might be inclined to delete the problem partition and run testdisk, and let it sort out what's what. There can be issues if you have deleted other partitions yourself at some time. You'll have to decide what is valid.
Still, is there a tool out there which can change a primary into an extended partition and vice versa?
jiml8 you complain in the other thread that I didn't answer your suggestion in post #2, but honestly what more could I post? The information from the relevant partition is rendered in "pseudo" code and the rest explained in the text. Exactly what more is in the direct output of fdisk, what I overlooked to mention? Again I'm not home yet, if it's of use I'll try to do it at the weekend.
Personally I would have thought testdisk was quicker/simpler, but it matters not if you have rectified the situation.
Solaris is a problem child when introduced into a (Linux) multiboot environment - simple as that. Real care needs to be taken - in advance.
As for partitions, an extended is a (form of) primary partition. However, because it is basically a container for (multiple, chained) logical partition(s), the internal structure is significantly different to a single primary partition. Hence you can't simply just change one to the other.
Need I add that backups are always a good idea when screwing around with partitions ???.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by syg00
...Solaris is a problem child when introduced into a (Linux) multiboot environment - simple as that. Real care needs to be taken - in advance.
Hm. How? What needs to be done? Do you have a link to an explanation?
Quote:
Originally Posted by syg00
... As for partitions, an extended is a (form of) primary partition. However, because it is basically a container for (multiple, chained) logical partition(s), the internal structure is significantly different to a single primary partition. Hence you can't simply just change one to the other.
Okay, not from extended to primary without loss of the secondary partitions, understood. But if you know that and maybe get a warning message if you still want to proceed...
What I don't understand is why one can't change primary into extended on the fly. I mean as far as I understand the data in the partition table just get a different meaning, but what the heck, I'm no expert (obviously ).
Quote:
Originally Posted by syg00
... Need I add that backups are always a good idea when screwing around with partitions ???
Hrhrhr. I wouldn't have lost anything out of /home, just a lot of work pertaining to the setup of my box.
Not sure there's a link that has all the issues - but it's well documented in bits and pieces.
- you need a primary partition (for Solaris)
- you can't retain your current boot-loader (mmmmm - it had better not be in a logical either methinks)
- you'd better not have more than one swap partition on the disk
...
Been a while since I bothered - I only install it as a virtual guest now. That way it thinks it is the only kid in town, and doesn't screw all my other systems. And when I decide to get rid of it, it's a simple process.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally Posted by syg00
...
- you need a primary partition (for Solaris)
Done.
Quote:
Originally Posted by syg00
...
- you can't retain your current boot-loader (mmmmm - it had better not be in a logical either methinks)
Nope. You have to hide everything in GRUB's menu.lst i.e. hide (0,0) up to and including hide (0,3). This means the solaris partition as well. Then you boot it.
Quote:
Originally Posted by syg00
...
- you'd better not have more than one swap partition on the disk
...
Didn't try, I just have one large one.
Quote:
Originally Posted by syg00
... Been a while since I bothered - I only install it as a virtual guest now. That way it thinks it is the only kid in town, and doesn't screw all my other systems. And when I decide to get rid of it, it's a simple process.
I installed it to learn. And I use my old 700 Mhz Athlon, no virtual solutions possible there...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.