Set the partition type with parted

1

I just acquired a new Dell laptop.

I installed Linux on the 1st half of the HDD and on the second part I want to install Oracle Solaris. According to this I need to set the partition type of the second half to be 0x82.

When I installed Linux I used parted version 3.1 and it looks like it does not have a command to change the partition type. Instead it looks like I have to provide [FS-TYPE] when issuing mkpart command.

Now looking at the supported types I see five possibilities: linux-swap(v1), linux-swap(v0), linux-swap, linux-swap(new) and linux-swap(old).

Which one of those 5 I should choose?

The problem I'm facing right now is that trying to install Oracle Solaris, the installer only recognizes NTFS file system. And when the time comes to ask where to install I have the whole disk as un-used. But according to the link above I should be able to cheat with the installer letting him know that I already have ready to use partition for Oracle Solaris.

Igor

Posted 2014-06-06T04:07:01.967

Reputation: 213

No, the reference you gave does not say you have to set the Solaris partition type to 0x82: that's the swap type. It says you have to set the partition type to ufs, the standard for Solaris. – MariusMatutiae – 2014-06-06T04:47:17.187

@MariusMatutiae, the link I referenced in the item 4 clearly says: "change temporary FAT-32 primary partition to Solaris partition, i.e. type 0x82". Now I also have some old fdisk from Linux install CD where type 0x82 clearly refer to "Linux swap/Solaris". I don't see anywhere the reference to "ufs" however. – Igor – 2014-06-06T06:30:40.967

The link you referenced states: * 3. Primary - Solaris UFS*.Could it be any clearer? Besides, you can always look it up on Wikipedia... – MariusMatutiae – 2014-06-06T06:49:56.947

There is no such thing as a "ufs" partition type code on either MBR or GPT disks. On MBR disks, partition type codes are 1-byte numbers, conventionally expressed in hexadecimal. In the past, the 0x82 type code was used by both Solaris filesystem and Linux swap partitions. I'm pretty sure that Solaris has moved on to something else, but I might be wrong, or the documentation to which Igor linked might be outdated. "UFS" is the name of the filesystem, like ext4fs, Btrfs, or NTFS. That's entirely different from the filesystem type code. – Rod Smith – 2014-06-07T13:53:02.933

Answers

1

0x82 is not a revision number of swap it is just the codename for swap so it doesn't matter which you pick they are all 0x82. See this link: http://www.tldp.org/HOWTO/Partition/partition-types.html

It appears you've misread the instructions. The swap partition must be formatted as swap, and the Solaris partition must be formatted as UFS. For parted commands see: http://postbin.per.red/pages/article24/page.php

[These codes are just examples, you will need to change some of the values before using them.]

To create a UFS parition:

Type in Parted "select /dev/sda".

Type in Parted "mkpartfs primary ufs 0.0 700.0"

To format an existing parition as UFS:

Type in Parted "mkfs yes 3 ufs"

mango

Posted 2014-06-06T04:07:01.967

Reputation: 11

0x82 is a partition type. I never said it is a revision number. Now 0x82 partition type is referenced as "Linux swap/Solaris" under old Linux fdisk software. Now under Linux I do have a swap partition which is hopefully of the type 0x82. But I never heard that Solaris will use any other partition type. I will try UFS and come back here to tell how it goes. Thank you. – Igor – 2014-06-06T06:36:05.740

2 things. Using the parted given with my Linux distro: 1. Nomkpartfs command. 2. No "ufs" "partition type". Only those: zfs, nilfs, ext4, ext3, ext2, fat32, fat16, hfsx, hfs+, hfs, jfs, swsusp, linux-swap(v1), linux-swap(v0), ntfs, reiserfs, hp-ufs, sun-ufs, xfs, apfs2, apfs1, asfs, amufs5, amufs4, amufs3, amufs2, amufs1, amufs0, amufs, affs7, affs6, affs5, affs4, affs3, affs2, affs1, affs0, linux-swap, linux-swap(new), linux-swap(old). Will try to get RescueCD with parted. – Igor – 2014-06-06T06:47:38.773

@Igor The parted man page http://linux.die.net/man/8/parted states that ufs is not supported by parted, so you cannot use mkpartfs, yet... it says you can use mkpart to make a partition of type ufs. This means you will have to add a fs later (parted cannot do it), but you can still reserve a space on your disk for a ufs partition.

– MariusMatutiae – 2014-06-06T06:55:07.370

@MariusMatutiae, well, apparently I can't, since my distro is not supporting ufs partition-type. I'm going to try with SystemRescueCD now. – Igor – 2014-06-06T08:07:49.637

@MariusMatutiae, well, SystemRescurCD also didn't work. Is there anything that can make a UFS partition on the GPT-partitioned disk? – Igor – 2014-06-06T09:43:41.957

Actually, according to http://docs.oracle.com/cd/E19455-01/806-0956/preserving-46/index.html, I don't have any other choice, but to Install OS first, and then install Linux as a secondary operating system. (even though the link is quite old and talks about Solris 8.

– Igor – 2014-06-06T10:02:08.983

@Igor According to the instructions you referenced, you do not need to make a ufs-type partition, just to set it apart. gpart should be able to do it. It is the filesystem on top of the partition that cannot be done by parted, or SystemResourceCD. GNU parted can surely do that, search for ufs in this page, http://www.gnu.org/software/parted/manual/parted.html

– MariusMatutiae – 2014-06-06T10:23:26.157

1

A new Dell laptop would almost certainly ship with Windows 8 and use the Extensible Firmware Interface (aka Unified EFI, or UEFI) firmware rather than the old Basic Input/Output System (BIOS) firmware. EFI-based systems usually use the GUID Partition Table (GPT) rather than the older Master Boot Record (MBR) partitioning scheme that's usually (but not always) used with BIOS.

This is relevant because the instructions to which you've linked assume a BIOS-mode installation with MBR. If you're continuing to use GPT and EFI, the procedures will be completely different! According to this document, Solaris now supports EFI-mode booting, but I can't point you to specific instructions for how to install it in this mode.

Most modern EFIs include a Compatibility Support Module (CSM), which enables the computer to boot in BIOS mode. Thus, you may be able to boot in BIOS mode, but this will be easiest if you configure all your OSes to boot in BIOS mode. In the case of Windows, this will require converting the disk from GPT to MBR. For all OSes, if the disk is currently in GPT form, converting to MBR will require re-installing the boot loader. In most cases, you'll need to go into the firmware setup utility and activate the CSM -- it's usually identified by that name or by the name "legacy support" or something similar. Sometimes it's activated by de-activating "UEFI support" or something similar. (There's nothing remotely standardized about these user interfaces, unfortunately.) If you're wiping everything and re-installing, this boot-mode and partition table juggling isn't a big deal, once you understand what needs to be done. If you want to keep Windows, though, it can be a hassle.

Also, computers that ship with Windows 8 almost always ship with Secure Boot active. Disabling this feature is required to install some OSes. Some Linux distributions support Secure Boot but others don't. I have no idea about Solaris. You should be able to disable Secure Boot in your firmware -- but again, precisely how depends on your firmware's user interface.

If necessary, you can switch between EFI-mode and BIOS-mode boots, but this is often awkward. Most EFIs permit doing it using their built-in boot managers, which are usually dreadful tools; or you can install my rEFInd boot manager, which makes things a bit easier. (With rEFInd, you must uncomment the scanfor line in the refind.conf file and ensure that a suitable BIOS-mode option is added to the line.)

As to partition types, parted and GParted are terrible tools for manipulating partition type codes, because they don't provide an explicit way to do this. These tools will set the type code based on the filesystem type you specify, but if you need to use something else, you're out of luck. Instead, you should use fdisk (for MBR disks) or gdisk (for GPT disks) to set partition type codes in any but the handful of standardized ways that libparted permits. FWIW, IIRC Solaris has abandoned the 0x82 type code in favor of something else, but I don't recall what it's now using instead.

Rod Smith

Posted 2014-06-06T04:07:01.967

Reputation: 18 427