Welcome to the Linux Foundation Forum!

Doubt regarding lab 44.4

When working on lab 44.4, precisely the table restoring part (exercise 4), I could not do it because my root directory was in the sda disk. Thus, I could not mount /dev/sda without the backup file information. Only after creating a backup copy of the gpt table in a USB driver was I able to restore the system. In this regard, my doubt is:

  • Is the root directory in another driver or inside /dev/sda in the lab's exercise? In the latter case, how can I restore the partition table information since I can't mount the disk without this information? For this lab, I used the gpt scheme.
    Thanks in advance

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Hi @iri36, are you working on a bare metal system or on a VM? For GPT systems there is a note in the PDF for that lab:

    The following instructions for an MBR system. if you have GPT you need to use sgdisk with the --backup-file and --load-backup options as discussed in the partitioning chapter

    Regards,
    Luis.

  • Hi @luisviveropena,

    I'm working with a VM with Ubuntu 20.04 in VirtualBox. I used sgdisk with --backup and --load-backup as suggested in the lab. My problem was that the backup file was created in the /home dir which was in the dev/sda and after deleting the partition table, I could not mount the device and therefore could not access my backup file. BTW, in the GPT system, how do I delete the GPT table? I used "sgdisk --clear /dev/sda" but I'm not sure if this is the right way to do it. Thanks!

  • Hi @iri36,

    I'm working with a VM with Ubuntu 20.04 in VirtualBox. I used sgdisk with --backup and --load-backup as suggested in the lab. My problem was that the backup file was created in the /home dir which was in the dev/sda and after deleting the partition table, I could not mount the device and therefore could not access my backup file.

    Oh, hehehe, I see. So you need to save the backup file to another place and partition. If /tmp is a separated partition, you can put it there, or to any other partition that can work for this purpose.

    BTW, in the GPT system, how do I delete the GPT table? I used "sgdisk --clear /dev/sda" but I'm not sure if this is the right way to do it. Thanks!

    Per the man page you are correct:

    -o, --clear
    Clear out all partition data. This includes GPT header data, all partition definitions, and the protective MBR.

    Regards,
    Luis.

  • Thanks, @luisviveropena!!!

  • It's a pleasure @iri36!!

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training