Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Install changed FS type labels

  1. #1
    Join Date
    Jan 2014
    Location
    San Jose City, PH.
    Posts
    118

    Default Install changed FS type labels

    Last night I tried to install OpenSuse in my drive. I selected expert for setting up the filesystem because I wanted it to use only what was already present, without formatting.

    I have only 1 drive, which was formatted with:
    sda1: Grub boot
    sda2: BTRFS with @/, @/home/. @/opt, and a snapshots directory on the volume.

    Kubuntu was previously installed, but I don't like it as much as OpenSUSE, so I tried to install OpenSUSE over the existing system. I expected it to write a new @/ to the volume during the install. That's when things began to go terribly wrong. Instead of being able to recognize what was already existing on the hard drive, the installer tried to scramble things around in an unnecessary way:

    [unable to upload photo]

    As you can not see from the screenshot which I can not upload (because I don't have a url to place any photos into,) the installer tried to relabel sda2 as an XFS filesystem and marked it to be mounted on /home instead of a btrfs on /.

    It also divided up the sda1 into:
    /dev/sda1 Bios grub
    /dev/sda2 swap
    /dev/sda3 btrfs /

    This was so wrong. I thought I could just edit it to the correct situation and mark it as "do not format", but that didn't work. Instead the install failed with:
    Code:
     Failure occurred during the following Action:
    Mounting /dev/sda3 to /
    
    VOLUME_MOUNT_FAILED
    
    System error code was: -3003
    
    /bin/mount -t btrfs '/dev/sda3' '/mnt':
    mount: wrong fs type, bad option, bad superblock on /dev/sda3,
       missing codepage or helper program, or other error
    
       In some cases useful info is found in syslog - try
    
    ...
    
    Continue despite the error?
    Now I can't access that partition anymore. kdepartitiontool says the filesystem is "unknown". I know that I can't use the partition tool to fix that partition without formatting it, so that's not an option.

    So - how can I fix this to make the labels for the filesystem on sda3 actually read as btrfs again so I can recover that partition and boot this drive again?


    There must be some way to restore the btrfs label without hosing the entire partition.
    AMD Ryzen 3 1200 Quad-core Processor, 32MB memory, KDE
    DRIVES: 2 4TB BTRFS raid1, 1 4TB BTRFS for backups

  2. #2
    Join Date
    Jan 2014
    Location
    San Jose City, PH.
    Posts
    118

    Default Re: Install changed FS type labels

    Update:

    I have deleted the bogus swap partition (former sda2) which made the btrfs use the designation sda2 once again.
    I'm not worried about sda1 (the grub boot) since I can delete that, recreate it, with the original dimensions, and it will be reinstalled when I use the Kubuntu live disk to reinstall the system. After that I'll worry about how to safely convert it to OpenSUSE.

    The pending problem is how to restore the partition table on the btrfs partition, which is now sda2.

    Code:
    root@kubuntu:~# fdisk -l
    Disk /dev/loop0: 1.6 GiB, 1678491648 bytes, 3278304 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: F9C78116-9D2E-4304-A329-E3A7704EF117
    
    Device         Start        End    Sectors  Size Type
    /dev/sda1         34       2047       2014 1007K BIOS boot
    /dev/sda2  172023808 5860532223 5688508416  2.7T Microsoft basic data
    
    Partition 1 does not start on physical sector boundary.
    
    
    
    
    Disk /dev/sdc: 29.6 GiB, 31809331712 bytes, 62127601 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x06008704
    
    Device     Boot   Start     End Sectors  Size Id Type
    /dev/sdc1  *          0 3384575 3384576  1.6G  0 Empty
    /dev/sdc2       3362880 3367487    4608  2.3M ef EFI (FAT-12/16/32)
    root@kubuntu:~#
    sdc is my live boot USB drive.
    AMD Ryzen 3 1200 Quad-core Processor, 32MB memory, KDE
    DRIVES: 2 4TB BTRFS raid1, 1 4TB BTRFS for backups

  3. #3
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,332

    Default Re: Install changed FS type labels

    Quote Originally Posted by rwbehne1 View Post
    Update:

    I have deleted the bogus swap partition (former sda2) which made the btrfs use the designation sda2 once again.
    I'm not worried about sda1 (the grub boot) since I can delete that, recreate it, with the original dimensions, and it will be reinstalled when I use the Kubuntu live disk to reinstall the system. After that I'll worry about how to safely convert it to OpenSUSE.

    The pending problem is how to restore the partition table on the btrfs partition, which is now sda2.

    Code:
    root@kubuntu:~# fdisk -l
    Disk /dev/loop0: 1.6 GiB, 1678491648 bytes, 3278304 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: F9C78116-9D2E-4304-A329-E3A7704EF117
    
    Device         Start        End    Sectors  Size Type
    /dev/sda1         34       2047       2014 1007K BIOS boot
    /dev/sda2  172023808 5860532223 5688508416  2.7T Microsoft basic data
    
    Partition 1 does not start on physical sector boundary.
    
    
    
    
    Disk /dev/sdc: 29.6 GiB, 31809331712 bytes, 62127601 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x06008704
    
    Device     Boot   Start     End Sectors  Size Id Type
    /dev/sdc1  *          0 3384575 3384576  1.6G  0 Empty
    /dev/sdc2       3362880 3367487    4608  2.3M ef EFI (FAT-12/16/32)
    root@kubuntu:~#
    sdc is my live boot USB drive.
    Try the following:


    Code:
    erlangen:~ # gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 7814037168 sectors, 3.6 TiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 27C8C52A-8091-403C-ADF1-E9C791667D40
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 7814037134
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 3693 sectors (1.8 MiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1            2048           16383   7.0 MiB     EF02  primary
       2           16384        67119103   32.0 GiB    0700  primary
       3        67119104       134223871   32.0 GiB    0700  primary
       4       134223872      7814035455   3.6 TiB     0700  primary
    erlangen:~ #
    Code:
    erlangen:~ # parted -l
    Model: ATA WDC WD40EZRX-22S (scsi)
    Disk /dev/sda: 4001GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags: pmbr_boot
    
    Number  Start   End     Size    File system     Name     Flags
     1      1049kB  8389kB  7340kB                  primary  bios_grub
     2      8389kB  34.4GB  34.4GB  linux-swap(v1)  primary  msftdata
     3      34.4GB  68.7GB  34.4GB  ext4            primary  legacy_boot, msftdata
     4      68.7GB  4001GB  3932GB  ext4            primary  msftdata
    
    
    Model: NVMe Device (nvme)
    Disk /dev/nvme0n1: 512GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags: 
    
    Number  Start   End     Size    Type     File system     Flags
     1      1049kB  34.4GB  34.4GB  primary  linux-swap(v1)  type=82
     2      34.4GB  68.7GB  34.4GB  primary  ext4            boot, type=83
     3      68.7GB  512GB   443GB   primary  ext4            type=83
    
    
    erlangen:~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  4. #4
    Join Date
    Jan 2014
    Location
    San Jose City, PH.
    Posts
    118

    Default Re: Install changed FS type labels

    I got this response:

    Code:
    root@kubuntu:~# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 5860533168 sectors, 2.7 TiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): F9C78116-9D2E-4304-A329-E3A7704EF117
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 5860533134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 172022671 sectors (82.0 GiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              34            2047   1007.0 KiB  EF02  BIOS boot partition
       2       172023808      5860532223   2.6 TiB     0700  primary
    Code:
    root@kubuntu:~# parted -l
    Model: ATA ST3000DM001-1ER1 (scsi)
    Disk /dev/sda: 3001GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name                 Flags
     1      17.4kB  1049kB  1031kB               BIOS boot partition  bios_grub
     2      88.1GB  3001GB  2913GB               primary              msftdata
    
    
    Warning: The driver descriptor says the physical block size is 2048 bytes, but
    Linux says it is 512 bytes.
    Ignore/Cancel? i                                                          
    Model: General USB Flash Disk (scsi)
    Disk /dev/sdc: 127GB
    Sector size (logical/physical): 2048B/512B
    Partition Table: mac
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name   Flags
     1      2048B   6143B   4096B                Apple
     2      1722MB  1724MB  2359kB               EFI
    
    
    root@kubuntu:~#
    AMD Ryzen 3 1200 Quad-core Processor, 32MB memory, KDE
    DRIVES: 2 4TB BTRFS raid1, 1 4TB BTRFS for backups

  5. #5
    Join Date
    Sep 2012
    Posts
    7,108

    Default Re: Install changed FS type labels

    Quote Originally Posted by rwbehne1 View Post
    it will be reinstalled when I use the Kubuntu live disk to reinstall the system
    If you are going to reinstall, how does it matter what is on disk now?
    how to safely convert it to OpenSUSE.
    Then explain what you are trying to do. Sharing existing btrfs is unlikely supported by installer; nor do I remember any statement anywhere to the contrary. It may be possible to pull off manually, as long as different operating systems use different subtrees, by pre-creating necessary volumes and defining mount points manually during installation. But I am not sure how useful it is in practice.

  6. #6
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,332

    Default Re: Install changed FS type labels

    Quote Originally Posted by rwbehne1 View Post
    I got this response:

    Code:
    root@kubuntu:~# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 5860533168 sectors, 2.7 TiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): F9C78116-9D2E-4304-A329-E3A7704EF117
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 5860533134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 172022671 sectors (82.0 GiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              34            2047   1007.0 KiB  EF02  BIOS boot partition
       2       172023808      5860532223   2.6 TiB     0700  primary
    Code:
    root@kubuntu:~# parted -l
    Model: ATA ST3000DM001-1ER1 (scsi)
    Disk /dev/sda: 3001GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name                 Flags
     1      17.4kB  1049kB  1031kB               BIOS boot partition  bios_grub
     2      88.1GB  3001GB  2913GB               primary              msftdata
    
    
    Warning: The driver descriptor says the physical block size is 2048 bytes, but
    Linux says it is 512 bytes.
    Ignore/Cancel? i                                                          
    Model: General USB Flash Disk (scsi)
    Disk /dev/sdc: 127GB
    Sector size (logical/physical): 2048B/512B
    Partition Table: mac
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name   Flags
     1      2048B   6143B   4096B                Apple
     2      1722MB  1724MB  2359kB               EFI
    
    
    root@kubuntu:~#
    Try install and execute gparted > device > data rescue:
    Code:
    erlangen:~ # zypper in gparted
    Loading repository data...
    Reading installed packages...
    'gparted' is already installed.
    No update candidate for 'gparted-0.29.0-1.1.x86_64'. The highest available version is already installed.
    Resolving package dependencies...
    
    Nothing to do.
    erlangen:~ # gparted /dev/sda
    Created symlink /run/systemd/system/-.mount → /dev/null.
    Created symlink /run/systemd/system/boot.mount → /dev/null.
    Created symlink /run/systemd/system/home.mount → /dev/null.
    Created symlink /run/systemd/system/home\x2dHDD.mount → /dev/null.
    Created symlink /run/systemd/system/Leap\x2d42.3.mount → /dev/null.
    Created symlink /run/systemd/system/mnt.mount → /dev/null.
    Created symlink /run/systemd/system/mnt1.mount → /dev/null.
    Created symlink /run/systemd/system/run-media-karl-2ff73487\x2de05c\x2d44b1\x2d9e89\x2d6c82dff425e7.mount → /dev/null.
    Created symlink /run/systemd/system/run-media-karl-68c08ef7\x2d9d78\x2d4e2a\x2dabf5\x2d77b0f6cf7999.mount → /dev/null.
    Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
    Created symlink /run/systemd/system/run-user-1001.mount → /dev/null.
    Created symlink /run/systemd/system/run-user-1002.mount → /dev/null.
    Created symlink /run/systemd/system/sysroot.mount → /dev/null.
    Created symlink /run/systemd/system/tmp.mount → /dev/null.
    Created symlink /run/systemd/system/var-lib-machines.mount → /dev/null.
    Created symlink /run/systemd/system/var-lib.mount → /dev/null.
    Created symlink /run/systemd/system/var-lock.mount → /dev/null.
    Created symlink /run/systemd/system/var-run.mount → /dev/null.
    Created symlink /run/systemd/system/var.mount → /dev/null.
    ======================
    libparted : 3.2
    ======================
    
    ** (gpartedbin:8417): WARNING **: Invalid borders specified for theme pixmap:
            /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,
    borders don't fit within the image
    Removed /run/systemd/system/-.mount.
    Removed /run/systemd/system/boot.mount.
    Removed /run/systemd/system/home.mount.
    Removed /run/systemd/system/home\x2dHDD.mount.
    Removed /run/systemd/system/Leap\x2d42.3.mount.
    Removed /run/systemd/system/mnt.mount.
    Removed /run/systemd/system/mnt1.mount.
    Removed /run/systemd/system/run-media-karl-2ff73487\x2de05c\x2d44b1\x2d9e89\x2d6c82dff425e7.mount.
    Removed /run/systemd/system/run-media-karl-68c08ef7\x2d9d78\x2d4e2a\x2dabf5\x2d77b0f6cf7999.mount.
    Removed /run/systemd/system/run-user-1000.mount.
    Removed /run/systemd/system/run-user-1001.mount.
    Removed /run/systemd/system/run-user-1002.mount.
    Removed /run/systemd/system/sysroot.mount.
    Removed /run/systemd/system/tmp.mount.
    Removed /run/systemd/system/var-lib-machines.mount.
    Removed /run/systemd/system/var-lib.mount.
    Removed /run/systemd/system/var-lock.mount.
    Removed /run/systemd/system/var-run.mount.
    Removed /run/systemd/system/var.mount.
    erlangen:~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  7. #7
    Join Date
    Jan 2014
    Location
    San Jose City, PH.
    Posts
    118

    Default Re: Install changed FS type labels

    Quote Originally Posted by arvidjaar View Post
    If you are going to reinstall, how does it matter what is on disk now?
    Are you in the habit of deleting all your data when installing anything new? From your question it certainly sounds like it. But that's not the topic of this thread, is it? (Rhetorical question.)


    Then explain what you are trying to do.
    At the risk of being seen repeating myself, I had previously stated: "The pending problem is how to restore the partition table on the btrfs partition, which is now sda2." I think that was pretty clear. I even made it bold so that it would stand out, thus making questions like this unnecessary. Apparently that didn't work.

    Sharing existing btrfs is unlikely supported by installer; nor do I remember any statement anywhere to the contrary. It may be possible to pull off manually, as long as different operating systems use different subtrees, by pre-creating necessary volumes and defining mount points manually during installation. But I am not sure how useful it is in practice.
    You aren't following what I'm saying. I don't want to "share" the volume between two operating systems, I want to replace Kubuntu with OpenSUSE. I never said anything about dual booting, which is possible...
    ( See: https://www.kubuntuforums.net/showth...umes+partition. ) Installing a new system into the volume without formating it will typically overwrite the @/ subvolume. Snapshots aren't touched, so they can easily be used to restore @/home and other subvolumes, if needed.

    But again, that's not the topic of this thread. The topic is how to restore the partition table on the btrfs partition which got hosed by the OpenSUSE install program. I need the system to once again know that my sda2 is a btrfs filesystem. So, with all due respect, please refrain from directing everyone's attention away from the topic of this thread.
    AMD Ryzen 3 1200 Quad-core Processor, 32MB memory, KDE
    DRIVES: 2 4TB BTRFS raid1, 1 4TB BTRFS for backups

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Install changed FS type labels

    This is why it is recommended to have a separate home partition. Don't get fooled by BTRFS subtrees they are NOT separate file systems they are part of the same btree that makes up the file system. If you format the root all parts are formatted. So restore the home from your backup.

  9. #9
    Join Date
    Jan 2014
    Location
    San Jose City, PH.
    Posts
    118

    Default Re: Install changed FS type labels

    Quote Originally Posted by gogalthorp View Post
    This is why it is recommended to have a separate home partition. Don't get fooled by BTRFS subtrees they are NOT separate file systems they are part of the same btree that makes up the file system. If you format the root all parts are formatted. So restore the home from your backup.
    Thank you for your opinion.


    Now, do you have any relevant answers as to how to restore the partition table?
    AMD Ryzen 3 1200 Quad-core Processor, 32MB memory, KDE
    DRIVES: 2 4TB BTRFS raid1, 1 4TB BTRFS for backups

  10. #10
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Install changed FS type labels

    You formatted it away restore from your backups

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •