You are not logged in.

#1 2016-05-22 20:28:04

LabdaABeta676
Member
From: Ottawa, Ontario
Registered: 2016-05-22
Posts: 5
Website

I messed up when I didn't notice that I have a GPT instead of MBR part

So... I blindly went through the motions of installing arch on my new laptop. I did the following:

fdisk -l # to find which drive to use
cfdisk /dev/sda # to format it, gave it a 4G swap partition and used the rest as a big Linux filetype partition. Couldn't set it to bootable, but didn't think much of it
mkfs.ext4 /dev/sda2 # the big partition set to ext4
mount /dev/sda2 /mnt #mount it
mkswap /dev/sda1 # the swap partition
swapon /dev/sda1
wifi-menu # connected to my wifi
pacstrap /mnt base base-devel # seemed to work fine
arch-chroot /mnt #WORKED
passwd # set a sensible password
vi /etc/locale.gen # uncommented desired locales
locale-gen
ln -s /usr/share/zoneinfo/COUNTRY/ZONE /etc/localtime #set my local time zone
echo "HOSTNAME" > /etc/hostname # set a sensible host name
pacman -S grub-bios
grub-install /dev/maindrive # apparently must have failed, but I didn't notice (it seemed to work ok, but probably had an error message at the end)
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
exit # left arch-chroot /mnt environment
genfstab /mnt >> /mnt/etc/fstab
umount /mnt
reboot # all fine it seemed

Of course thanks to my GPT and grub issues, grub failed to load, and my system couldn't find any bootable material. So I reinserted the USB and did some googling to find that grub must have failed spectacularly. Then I continued to fuck up with:

mount /dev/sdb2 /mnt # I don't know why sda moved to sdb, but it did
# some ls / cd'ing around to see that everything seemed fine, but not working
cfdisk /dev/sdb2 # what kind of idiot changes partitions of a mounted drive... this kind (added a BIOS boot partition of 1M size by deleting both existing partitions and remaking them)
umount /mnt # retroactive unmount after realizing I was on an invalid partition probably
reboot # umount failed, decided to start from scratch

At next reboot I again booted to my USB iso and tried to start from scratch, no mounting /dev/sd?, no skipping steps.

fdisk -l # sdb moved back to sda, just to be particularly annoying
cfdisk /dev/sda # deleted all partitions, recreated them appropriately (4GB swap, 1M BIOS boot, remaining all Linux Filesystem)
mkfs.extf /dev/sda3
mount /dev/sda3 /mnt
mkswap /dev/sda1
swapon /dev/sda1
arch-chroot /mnt # I decided to skip re-installing arch, because it seemed like a waste of data

Unfortunately arch-chroot failed complaining that "mount: mount point /mnt/proc does not exist". At this point I have no idea what to do. I can't find the physical drive in the computer in order to manually wipe it and truly start from scratch (I looked thoroughly, it appears this laptop uses some kind of embedded SSD, or maybe it just hides the SSD really really well). Now I can't boot the device and all I can do is run the arch iso off my USB.

Anybody have any idea how to properly install Arch on a messed up system after going through the motions of an MBR install when my drive uses a GPT?

Any help would be appreciated.

Offline

#2 2016-05-22 20:35:33

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

LabdaABeta676 wrote:

my drive uses a GPT

Are you sure?

Please post the full output of:

parted -l # that's a letter ell not a number one

You can run this command from any Linux live ISO image, it doesn't have to be run from your Arch system.

Offline

#3 2016-05-22 20:44:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2016-05-22 20:44:13

LabdaABeta676
Member
From: Ottawa, Ontario
Registered: 2016-05-22
Posts: 5
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

Hand-typed because my laptop only has one USB drive and the boot menu takes forever.

Model: ATA SAMSUNG M2NLF128 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 4296MB 4295MB linux-swap(v1)
2 4296MB 4297MB 1049kB ext4 bios_grub
3 4297MB 128GB ext4

Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 8023MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 8023MB 8022MB primary fat32 boot, lba


So I'm pretty sure it is a GPT. What now?

Offline

#5 2016-05-22 20:52:57

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

LabdaABeta676 wrote:
Model: ATA SAMSUNG M2NLF128 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 4296MB 4295MB linux-swap(v1)
2 4296MB 4297MB 1049kB ext4 bios_grub
3 4297MB 128GB ext4

Hmmm... that's a bit of a mess -- the "bios_grub" flag means that sda2 is not recognised as a GNU/Linux partition, notwithstanding the filesystem applied on top.

I would recommend starting again and using `gdisk` instead, it is far clearer to use IMO.

This will wipe your current partition table:

# sgdisk --zap-all /dev/sdX

Then use:

# gdisk /dev/sdX

And use the interactive mode to create the swap and the root partition and make sure that the device is filled with those partitions then create an extra BIOS boot partition (type "ef02") in sectors 34-2047 (these should be left empty to ensure correct alignment of the other partitions).

This will allow you to use GRUB to boot the GPT disk in non-UEFI mode.

Alternatively, use `fdisk` to create a new MBR-style partition table on the device after running `sgdisk --zap-all` and forget about the BIOS boot partition entirely.

Offline

#6 2016-05-22 21:19:09

LabdaABeta676
Member
From: Ottawa, Ontario
Registered: 2016-05-22
Posts: 5
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

Thank you very much, progress is being made. Unfortunately

arch-chroot /mnt

still spits out

mount: mount point /mnt/proc does not exist

. The new

parted -l

output is:

Model: ATA SAMSUNG M2NLF128 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system     Flags
 2      1049kB  4296MB  4295MB  primary  linux-swap(v1)
 1      4296MB  128GB   124GB   primary  ext4            boot

Model: General USB Flash Disk (scsi)
etc...

Should I just run

pacstrap /mnt base base-devel

again?

Offline

#7 2016-05-23 07:18:58

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

LabdaABeta676 wrote:

Unfortunately

arch-chroot /mnt

still spits out

mount: mount point /mnt/proc does not exist

You need to list the exact commands used up to that point, preferably using code tags.

If /mnt/proc does not exist, that would suggest that the filesystem package (part of the base group usually installed with `pacstrap`) has not been installed to whichever device is mounted to /mnt

Be aware that you now have an MBR-style partition table with no EFI system partition so you will be following the non-UEFI installation instructions.

If your firmware ("BIOS") is UEFI, be sure to enable "CSM" or "Legacy" mode.

Offline

#8 2016-05-23 13:38:56

LabdaABeta676
Member
From: Ottawa, Ontario
Registered: 2016-05-22
Posts: 5
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

Thank you, I can't believe I forgot that I so heartily messed up my hard drive, so of course the install wasn't valid. And I did indeed have to enable Legacy mode in my BIOS.

You were very helpful. I owe you a sheep wink.

Offline

#9 2016-05-23 18:48:52

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: I messed up when I didn't notice that I have a GPT instead of MBR part

Baaa, it was nothing tongue

Please add [SOLVED] to the thread title to help others.

Offline

Board footer

Powered by FluxBB