You are not logged in.

#1 2012-08-15 16:49:15

kemoryan
Member
Registered: 2012-08-15
Posts: 7

[Solved] Syslinux + GPT on SSD

Hello all,

I've been trying to install arch for the past 3 days without success. I have a thinkpad x230 with an M4 SSD on which I want to install the configuration stated in the title. I've managed to install Windows and LMDE on this disk in less than 30 min. But I don't want these.

So the steps I take are:

- Use gdisk to create the GUID partition. 'o' option, then two 'n' options to create the /boot (sdc1) - around 100mb-, and / (sdc2) -around 118GB- partitions. Both as Linux Filesystem.

- Format them with the ext4 filesystem.

- Mount sdc2 on /mnt and sdc1 on /mnt/boot

-Install the base base-devel filesystem.

- Generate fstab.

- Arch-chroot.

- Create an initial ramdisk environment (I skip all the language, locale and network config for now).

- pacman S syslinux. And edit the config file.

- sgdisk /dev/sdc1 --attributes=1:set:2   *here is where I think it fails

- dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdc1

And then I reboot, and it won't boot syslinux at all. No idea what am I missing...



Edit: forgot to mention. The BIOS works both as UEFI or Legacy. THe first two days I tried the UEFI route without success, now I'm trying the normal BIOS option since it seems simpler.

Last edited by kemoryan (2012-08-16 01:13:01)

Offline

#2 2012-08-15 17:14:54

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Syslinux + GPT on SSD

Welcome to the forum.

...
dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdc1

Don't do that. Don't write the MBR to a partition.

Use /dev/sdc, not /dev/sdc1. You don't see "sdx1" here, do you?


Also: https://wiki.archlinux.org/index.php/GP … er_Support

If you suspect that the boot flag isn't set correctly, you can set it using GParted, from Parted Magic, GParted Live, an Ubuntu LiveCD, etc. Just right click the partition, "Manage Flags" and check the "legacy_boot" checkbox.


PS: Don't forget to mark it as solved (by editing the first post).


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-08-15 17:23:35

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Syslinux + GPT on SSD

Also, make sure that the drive (the SSD?) is the first to boot in the BIOS (or is it the UEFI menu?).

Edit: I have Arch installed on /dev/sdb here, and there are no issues with Syslinux. If you can't find any options for specifying the boot order, then I'm pretty sure that you can get around this by opening up the computer and using the first SATA cable for this drive, so that /dev/sdc becomes /dev/sda.

Last edited by DSpider (2012-08-15 17:35:59)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#4 2012-08-15 17:24:31

kemoryan
Member
Registered: 2012-08-15
Posts: 7

Re: [Solved] Syslinux + GPT on SSD

Thanks for your input.

So I should use sdc and not sdc1 for the sgdisk commands as well?

DSpider wrote:

Welcome to the forum.

...
dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdc1

Don't do that. Don't write the MBR to a partition.

Use /dev/sdc, not /dev/sdc1. You don't see "sdx1" here, do you?


Also: https://wiki.archlinux.org/index.php/GP … er_Support

If you suspect that the boot flag isn't set correctly, you can set it using GParted, from Parted Magic, GParted Live, an Ubuntu LiveCD, etc. Just right click the partition, "Manage Flags" and check the "legacy_boot" checkbox.


PS: Don't forget to mark it as solved (by editing the first post).

Offline

#5 2012-08-15 17:29:20

kemoryan
Member
Registered: 2012-08-15
Posts: 7

Re: [Solved] Syslinux + GPT on SSD

Ahh this was also an issue I thought about (my SSD sometimes was sdc or sdb). I will change the boot order, thanks!

DSpider wrote:

Also, make sure that the drive (the SSD?) is the first to boot in the BIOS (or is the UEFI menu?).

Edit: I have Arch installed on /dev/sdb here, and there are no issues with Syslinux. If you can't find any options for specifying the boot order, then I'm pretty sure that you can get around this by opening up the computer and using the first SATA cable for this drive, so that /dev/sdc becomes /dev/sda.

Offline

#6 2012-08-15 17:35:44

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Syslinux + GPT on SSD

So I should use sdc and not sdc1 for the sgdisk commands as well?

Yes. There's no "sdx1" for it either.

https://wiki.archlinux.org/index.php/Sy … le_aka_GPT


my SSD sometimes was sdc or sdb

That's probably because the USB stick was /dev/sda. This is normal behaviour from what I can tell.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-08-15 17:37:24

kemoryan
Member
Registered: 2012-08-15
Posts: 7

Re: [Solved] Syslinux + GPT on SSD

Wouldn't that mess up with the syslinux.config pointing to my arch? That is, in case I boot arch while having a USB drive connected with the /dev/sda label assigned?

DSpider wrote:

So I should use sdc and not sdc1 for the sgdisk commands as well?

Yes. There's no "sdx1" for it either.

https://wiki.archlinux.org/index.php/Sy … le_aka_GPT


my SSD sometimes was sdc or sdb

That's probably because the USB stick was /dev/sda. This is normal behaviour from what I can tell.

Offline

#8 2012-08-15 17:44:54

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Syslinux + GPT on SSD

That's what UUIDs are for.

https://wiki.archlinux.org/index.php/Sy … sic_Config

$ sudo blkid
LABEL arch
        MENU LABEL Arch Linux
        LINUX ../vmlinuz-linux
        APPEND root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ro
        INITRD ../initramfs-linux.img

Last edited by DSpider (2012-08-15 17:45:04)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-08-15 18:02:30

kemoryan
Member
Registered: 2012-08-15
Posts: 7

Re: [Solved] Syslinux + GPT on SSD

I did it correctly this time (using sdb and not sdb1, etc.), and still no luck when booting even though it seems to set the flag well now. Then ran a live lmde usb to use gparted. The "boot" flag (I don't see any "legacy_boot" flag)  on sdb1 was not set (I read somewhere that GPT doesn't need it, but I might be wrong) , so I set the flag active, reboot, and still syslinux is not booting, ugh.  I must have missed out some really obvious thing... thanks for being patient!

Offline

#10 2012-08-15 18:37:12

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Syslinux + GPT on SSD

So the SSD is now in the first SATA slot? Great. Then it will show up as "/dev/sdb" from a LiveUSB and as "/dev/sda" when you're booting from the drive. Ok, so the boot flag and the MBR boot code are set. What about the files? Were they ever installed? Because I don't see any indication of it in the initial post. Maybe you just forgot. Pop in the Arch install media and run:

# mount /dev/sdb2 /mnt
# mount /dev/sdb1 /mnt/boot
# arch-chroot /mnt
# mkdir /boot/syslinux
# extlinux --install /boot/syslinux

This is congruent with the manual install, btw. Basically: files, legacy_boot flag and gptmbr.bin.

Screenshot from Parted Magic 2012.05.30:

YOBHu.png

If you're booting with BIOS compatibility you should definitely use this flag.

https://wiki.archlinux.org/index.php/GP … er_Support

Syslinux requires the /boot partition to be marked as "Legacy BIOS Bootable" GPT attribute (legacy_boot flag in GNU Parted) to identify the partition containing the syslinux boot files by its MBR boot code gptmbr.bin.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#11 2012-08-16 01:17:52

kemoryan
Member
Registered: 2012-08-15
Posts: 7

Re: [Solved] Syslinux + GPT on SSD

I finally got it working!

While I still didn't see the legacy_boot in my gparted version, I decided to try the automatic syslinux install again (which failed everytime until I stopped trying it). With the fixes mentioned by DSpider it worked this time and I've been able to boot syslinux and thus arch as well smile

I would have really given up had it not been for the excellent help I got here (also, being a computer scientist and not being able to install a linux distribution was hurting my pride). Again, thanks to everyone!

Last edited by kemoryan (2012-08-16 01:18:26)

Offline

Board footer

Powered by FluxBB