Set the partition type with parted

12,806

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"

Share:
12,806

Related videos on Youtube

beginner_coder1
Author by

beginner_coder1

Updated on September 18, 2022

Comments

  • beginner_coder1
    beginner_coder1 over 1 year

    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.

    • MariusMatutiae
      MariusMatutiae almost 10 years
      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.
    • beginner_coder1
      beginner_coder1 almost 10 years
      @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.
    • MariusMatutiae
      MariusMatutiae almost 10 years
      The link you referenced states: * 3. Primary - Solaris UFS*.Could it be any clearer? Besides, you can always look it up on Wikipedia...
    • Rod Smith
      Rod Smith almost 10 years
      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.
  • beginner_coder1
    beginner_coder1 almost 10 years
    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.
  • beginner_coder1
    beginner_coder1 almost 10 years
    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.
  • beginner_coder1
    beginner_coder1 almost 10 years
    @MariusMatutiae, well, apparently I can't, since my distro is not supporting ufs partition-type. I'm going to try with SystemRescueCD now.
  • beginner_coder1
    beginner_coder1 almost 10 years
    @MariusMatutiae, well, SystemRescurCD also didn't work. Is there anything that can make a UFS partition on the GPT-partitioned disk?
  • beginner_coder1
    beginner_coder1 almost 10 years
    Actually, according to docs.oracle.com/cd/E19455-01/806-0956/preserving-46/index.ht‌​ml, 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.
  • MariusMatutiae
    MariusMatutiae almost 10 years
    @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, gnu.org/software/parted/manual/parted.html