You are not logged in.

#1 2012-11-08 02:38:29

mrrhq
Member
Registered: 2012-11-07
Posts: 18

Problems after installing Arch [SOLVED]

Hello,

I attempted to follow the installation instructions to install Arch Linux. I followed those since they are faster than the Beginners Guide and didn’t meet some of my needs.

For example, I was also wanting to install an LVM partition (and I'll backup and set up dm-crypt+LUKS later after I get this issue solved), which the Beginner Guide didn't mention and there were a few other minor tweaks I wanted.

In my partition layout I have a 400MB boot (extra room for other kernels). followed by an LVM volume, which has one volume group with 4 logical partitions, these are: /, /home, /tmp, and /var.

The problem:

GRUB is not working, or at least it's not installed and configured correctly. When I boot up my computer, it says exactly, "GRUB", in the top-left corner of my screen and nothing happens. I have a poor understanding of the init/bootloader process in computers, which I am trying to learn slowly but steadily. I was re-reading the instructions for GPT specific partitions, which is what I use, and it says here:

http://www.gnu.org/software/grub/manual … stallation

That I'm supposed to have a "BIOS partition". This is interesting because I have no idea what this is for. Something came to mind when I was using cgdisk or gdisk, it would automatically allocate the first 2000-ish sectors (instead of 34 like the documentation was hinting), so this probably means something.... I don't know.

And then I read that the BIOS installation for GPT is supposed to be done before you install Arch Linux. Whoops! So can I fix this without having to reinstall Arch? I can probably mount all of my directories and chroot inside again after creating the BIOS partition so GRUB can be configured and reinstalled correctly. Maybe I can fix this. I don't know.

So I am trying to troubleshoot this problem, but is there anything I am understanding wrongly here? Is there some other reason why GRUB won't boot up? I tried Super GRUB 2 disk and that didn't work, there was just a blank screen when booting from grub.cfg. Any help or suggestions?

I am using x86_64 Arch Linux with the installed 3.6.4-1-ARCH Linux kernel.

Last edited by mrrhq (2012-11-08 22:31:49)

Offline

#2 2012-11-08 03:07:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Problems after installing Arch [SOLVED]

Welcome to Arch!

It is fine to read other parts of the wiki in addition, but you need to read the Beginners' Guide. You will not save time by skipping this step because you will end up having to do a lot more troubleshooting and redoing than if you take enough time to begin with.

For example:
https://wiki.archlinux.org/index.php/Be … rage_drive
https://wiki.archlinux.org/index.php/Be … bootloader

The Beginners' Guide tries to (and generally succeeds in) telling you what to do at the point you need to do it e.g. creating a BIOS boot partition for GRUB.

If you have GPT and if you are using BIOS booting, you almost certainly need one because grub is unlikely to fit in the available space otherwise. A 2M partition is enough. You may be able to resize your boot partition to accommodate it. Take care in case this alters the UUID of boot (I don't think it should). Leave it unformatted. Label it appropriately. Grub will find it when you install it to disk.

If you cannot boot with the super grub disk, though, it may be that there's another issue or that your machine doesn't like the GPT/BIOS combination. But it is hard to say without knowing exactly what you did, how you created the disk, what happened etc.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-11-08 03:45:47

mrrhq
Member
Registered: 2012-11-07
Posts: 18

Re: Problems after installing Arch [SOLVED]

cfr wrote:

Welcome to Arch!

[. . .]

If you have GPT and if you are using BIOS booting, you almost certainly need one because grub is unlikely to fit in the available space otherwise. A 2M partition is enough. You may be able to resize your boot partition to accommodate it. Take care in case this alters the UUID of boot (I don't think it should). Leave it unformatted. Label it appropriately. Grub will find it when you install it to disk.

If you cannot boot with the super grub disk, though, it may be that there's another issue or that your machine doesn't like the GPT/BIOS combination. But it is hard to say without knowing exactly what you did, how you created the disk, what happened etc.

Thanks very much for the welcome. Yes, I am new to Arch (how did you guess? Lul). Since I already have Arch installed I will try resizing and creating the 2MB partition, if it doesn't work. I'll just start the with the beginners guide and this thread can be locked.

By the way, I did get Debian 64-bit with Xfce to immediately work with GPT+GRUB2 right after installation, but I wanted to try out Arch on my desktop PC for various reasons.

I'll try some troubleshooting and let anyone know if/how I've figured everything out or have any more relevant problems.

Offline

#4 2012-11-08 03:58:41

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Problems after installing Arch [SOLVED]

Does debian take care of the partition for you though? 

From what I understand (I have not tried this though) grub2 is actually lvm aware.  So you can put all partitions within the lvm, including boot.  If this is the case, I see no reason why you would not also be able to put the 2MB bios boot partition in there as well.  I am not a grub user at all, but I know that grub apparently is larger than is capable of being handled by the regular 440bytes of the traditional bios.  So it needs a bit more, and this is what the 2MB partition is for.  I also kind of recall reading that it can be 1-2MB as well.

If you have no other linux installations on your system, since your /boot is already non-lvm, you could simply use syslinux.  It is super simple, and what I prefer if I use the legacy bios of my system.  ATM, I am a uefi user, which is pretty great using the kernel stub loader (no bootloaer!).  Just don't forget to put lvm2 hook in mkinitpcio.conf (after udev) and rebuild if your / is going to be on the lvm. 

I just started using lvm, and it is particualrly amazing.  I had tried to start using btrfs, and as amazing as it is, my battery life dropped by an hour.  So I switched back to ext4, but with lvm, and it actually provides a pretty awesome set of features.  The snapshot capability is pretty amazing, but I was really just looking for a way to have the filesystem/partition to span two drives.  Btrfs does this wonderfully, providing disk striping and everything.  But this is also something that lvm can do, so I am very pleased.

Offline

#5 2012-11-08 05:06:41

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Problems after installing Arch [SOLVED]

mrrhq wrote:

In my partition layout I have a 400MB boot (extra room for other kernels). followed by an LVM volume, which has one volume group with 4 logical partitions, these are: /, /home, /tmp, and /var.

Be aware that logical partitions are a construct of the Master Boot Record (MBR) partitioning system; however, the title of your thread, and some of the specifics, suggest that you're using the GUID Partition Table (GPT) system, which doesn't use logical partitions. If you're certain you used gdisk or cgdisk, and not fdisk or cfdisk, then you're using GPT and I'd simply accept your use of the word "logical" as an error. If there's any doubt in your mind about this, though, you should investigate further, since some of the issues and solutions depend greatly on which partitioning system you used.

That I'm supposed to have a "BIOS partition". This is interesting because I have no idea what this is for.

The BIOS Boot Partition holds a portion of the GRUB code. It's used on GPT disks but not on MBR disks -- on MBR, the equivalent code goes in an officially-unallocated area immediately after the MBR. The BIOS Boot Partition can sometimes be just a few kibibytes in size, but it's usually either 1MiB or 2MiB. (I've seen reports that some configurations now require over 1MiB, but I haven't investigated this claim.)

Something came to mind when I was using cgdisk or gdisk, it would automatically allocate the first 2000-ish sectors (instead of 34 like the documentation was hinting), so this probably means something.... I don't know.

No, these are unrelated issues. Most partitioning tools today, including gdisk and its siblings, align all partitions on 2048-sector (1MiB) boundaries so as to avoid performance penalties that can be incurred on Advanced Format disks, SSDs, and some types of RAID arrays. See this article I wrote on the topic some time ago.

That said, if you have nowhere else to put it, you could try creating a BIOS Boot Partition in that space. You'd need to change the alignment policy in gdisk or cgdisk to align on 1-sector boundaries to do so, although an 8-sector alignment would be safer for future changes if you've got an Advanced Format disk. The BIOS Boot Partition isn't really greatly affected by the alignment issues, so I wouldn't worry about leaving it unaligned. OTOH, if GRUB wants more then 1MiB on your system, this space would be too small, so it might be better to resize a partition to make room for the BIOS Boot Partition.

WonderWoofy wrote:

From what I understand (I have not tried this though) grub2 is actually lvm aware.  So you can put all partitions within the lvm, including boot.  If this is the case, I see no reason why you would not also be able to put the 2MB bios boot partition in there as well.

GRUB 2 is LVM-aware, and it is possible to put your Linux /boot directory inside the LVM. If you want to do this, though, there's really no point to split /boot off into a separate logical volume (the LVM equivalent of a partition); you might as well just make it a normal directory off of the root (/) filesystem. I'm pretty sure it is not possible to put the BIOS Boot Partition inside the LVM. That's because the code to parse the LVM data structures is contained within the BIOS Boot Partition, thus creating a chicken-and-egg situation if you were to attempt it. Furthermore, the code to write to the BIOS Boot Partition looks for the partition type code in the disk's partition table, and there's no equivalent to that in the LVM data structures. (All this said, in principle you might be able to get something like this to work, but the result would be something similar, but not identical, to a BIOS Boot Partition.)

Although GRUB 2 can read a kernel from within an LVM, I still prefer to keep a separate /boot partition. The reason is that you might not always use GRUB 2. If you wanted or needed to switch to another boot loader in the future, it might not be LVM-aware, and might need /boot to be on a true partition, not in an LVM. (This is true of every EFI boot loader except for GRUB 2, for instance.) In fact, I routinely create two or three smallish partitions on my computers so that I can create multiple /boot partitions for multi-boot configurations or to help transition to a new installation should the need arise. This can help simplify things when the time comes to start fresh.

Offline

#6 2012-11-08 05:10:12

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Problems after installing Arch [SOLVED]

I think the use of the work "partition" is the error in "logical partitions" where is should be logical volumes.

I keep a separate /boot for the efi system partition.  I actually just use it as a direct /boot, and it is very nice.  Not having to move the kernel and initramfs around when they update is pretty great.  Though I do have a service to append .efi to the kernel.  As a backup I have syslinux installed, since uefi can be finnicky.

Last edited by WonderWoofy (2012-11-08 05:16:05)

Offline

#7 2012-11-08 05:23:09

mrrhq
Member
Registered: 2012-11-07
Posts: 18

Re: Problems after installing Arch [SOLVED]

WonderWoofy wrote:

Does debian take care of the partition for you though? 

From what I understand (I have not tried this though) grub2 is actually lvm aware.  So you can put all partitions within the lvm, including boot.  If this is the case, I see no reason why you would not also be able to put the 2MB bios boot partition in there as well.  I am not a grub user at all, but I know that grub apparently is larger than is capable of being handled by the regular 440bytes of the traditional bios.  So it needs a bit more, and this is what the 2MB partition is for.  I also kind of recall reading that it can be 1-2MB as well.

If you have no other linux installations on your system, since your /boot is already non-lvm, you could simply use syslinux.  It is super simple, and what I prefer if I use the legacy bios of my system.  ATM, I am a uefi user, which is pretty great using the kernel stub loader (no bootloaer!).  Just don't forget to put lvm2 hook in mkinitpcio.conf (after udev) and rebuild if your / is going to be on the lvm. 

I just started using lvm, and it is particualrly amazing.  I had tried to start using btrfs, and as amazing as it is, my battery life dropped by an hour.  So I switched back to ext4, but with lvm, and it actually provides a pretty awesome set of features.  The snapshot capability is pretty amazing, but I was really just looking for a way to have the filesystem/partition to span two drives.  Btrfs does this wonderfully, providing disk striping and everything.  But this is also something that lvm can do, so I am very pleased.

I keep the boot partition separate so I can easily copy it over to an external drive if I want to for added convenience/security. So you are a syslinux user? You must be going for the speed. Honestly, I think GRUB2 boots just as fast with the timeouts set to 0, and you won't have to reinstall it if you ever plan to have more than one OS.

An error (in my brain) happened. I f*cked up my GPT layout by not resizing and using the LVM space and instead used that 1MB free space at the beginning I was talking about. I should have known it was required by GPT (it was probably the protective MBR or something). What a stupid idea. Now I'm going to try installing Arch again, and this time I'll remember to use the lvm2 hook in mkinipcio.conf since I think I also forgot that last time. Thanks for that.

Also, I don't know if mkinitcpio properly supports the btrfs file checking utility. because it says that fsck.btrfs is missing (it doesn't exist). But I'm still using ext4 in the meantime for speed until btrfs gets well developed.

Anyway, I think this thread can be locked unless anyone needs to say anything, and I will keep trying the installation again and again until I get it right!

Last edited by mrrhq (2012-11-08 05:23:44)

Offline

#8 2012-11-08 05:33:44

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Problems after installing Arch [SOLVED]

mrrhq wrote:

So you are a syslinux user? You must be going for the speed.

How did you come up with this?  I realy just like editing my own config file by hand and not having it generated by a tool.  Also, syslinux serves the functions I need, and it is not my primary method of booting.

If you are going to use btrfs, you certainly don't need LVM2.  It has all the features of lvm and much more.  The btrfsck is not really very developed.  But I know that btrfs incorporates real time checksumming and snapshots presumably can help somewhat alleviate the need (but not totally remove the need) for the fsck.

Offline

#9 2012-11-08 11:39:01

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Problems after installing Arch [SOLVED]

mrrhq wrote:

Anyway, I think this thread can be locked unless anyone needs to say anything, and I will keep trying the installation again and again until I get it right!

You can mark this thread as solved using the directions here, Forum Etquette: How to Post.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#10 2012-11-08 15:07:04

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Problems after installing Arch [SOLVED]

WonderWoofy wrote:

I think the use of the work "partition" is the error in "logical partitions" where is should be logical volumes.

Of course! It's obvious on re-reading! My apologies for the digression that resulted.

mrrhq wrote:

An error (in my brain) happened. I f*cked up my GPT layout by not resizing and using the LVM space and instead used that 1MB free space at the beginning I was talking about. I should have known it was required by GPT (it was probably the protective MBR or something).

It won't help you fix your problem, but the just-under-1MiB of free space at the start of your disk is not the protective MBR. The protective MBR is an MBR partition table that's part of every legal GPT disk. It's not really a partition at all; it just looks like one to GPT-unaware OSes and utilities. Its purpose is to keep such OSes and utilities from messing with the disk. The protective MBR consumes precisely one sector (512 bytes) on the disk and plays no role in the GPT scheme other than to protect the real GPT data structures and partitions from damage by GPT-unaware OSes and utilities.

As I said in my earlier post, most partitioning tools today (including gdisk) align partitions to 1MiB boundaries by default. Because GPT uses a few sectors at the beginning of the disk, this means that the first GPT partition usually begins at sector 2048, leaving a little under 1MiB unused at the start of the disk. It is safe to use this unpartitioned space if your partitioning software will let you do so. (gdisk does, if you manually alter the alignment policy.) Although GPT uses a few sectors at the beginning of the disk, no GPT partitioning software should enable you to create partitions in these few sectors. (An ability to do so would constitute a severe bug.) So whatever caused your problem, it wasn't the attempt to use that unpartitioned space per se, although of course you might have slipped up in your use of gdisk (or whatever tool you used) and done something incorrect.

Offline

#11 2012-11-08 15:20:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Problems after installing Arch [SOLVED]

mrrhq, I think you need to keep reading.  As srs5694 said, the 1-2MB partition is not the protective MBR.  It is actually something only required by grub2, and is (as already stated) the extra files and whatnot that does not fit in the first 440bytes of the drive.  Grub2 does so rediculously much, and is so complex, that there is no way that it would be able to fit all those features in the traditional space of the bios boot sector. 

Honestly, unless you are dead set on using GPT, you may want to save yourself the headache and use MBR partitioning.  I know that it is the system of yesteryear, but it works, and there are many many people who are using it successfully.  Extended/logical partitions are kind of a dirty hack in my opinion, but again, they work.  The gdisk utility even has an option to convert your GPT into MBR.  I have never tried it personally, but assuming that you probably have a very simple parition layout because you use LVM, I am sure your situation would be the perfect use case.  I don't think you would even be venturing into the realm of extended partitions.

Offline

#12 2012-11-08 18:35:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Problems after installing Arch [SOLVED]

Just to clarify something, syslinux doesn't boot in EFI mode, right? So when you use syslinux, you're booting in BIOS mode?

For what it is worth, GRUB2 need not actually be as complex as all that. Because Arch doesn't automate stuff behind your back, it is actually very easy to use a hand-edited config file rather than an automatically generated one. In that case, you can pretty much ignore all the files under /etc relating to the bootloader as they won't be used. I've found this makes it a lot more straightforward and intelligible to use as everything is in one file and I can set it out in "cfr-readable" format rather than the complicated code generated automatically. (This isn't really a criticism of that code - just it is intended to cover so many different cases that it always looks rather unmanageable to me. Since I only have to worry about my use case, my config file only has to deal with a tiny proportion of those possibilities and is, as a result, considerably simpler.)

This also means that the boot menu has entries which make sense to me and not whatever the boot loader thinks I should want!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2012-11-08 18:51:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Problems after installing Arch [SOLVED]

That is correct cfr.  But the area that is occupied for bios boot is not used whatsoever by UEFI or GPT.  So you can actually have both systems on a single drive.  It is basically so that if I ever run into the problem you have where a reset of my bios is required, I will be able to reboot successfully, slap the uefi shell in the /EFI/boot/bootx86.efi spot and then recover that way.

Yeah, I used grub2 for a bit a while back, but looking through the grub.cfg file, it was such a jumble of all kinds of crap, that I just said hell with this, and got something simpler.  I guess it was at that point that I longed for the original grub (like so many others).  Syslinux really does remind me quite a bit of that old grub system.  Though it doesn't have the ability to boot other /boot or / partitions without chainlaoding.  But this is okay, since you can actually install extlinux to the patition's superblock and chainload that.  If you make the extlinux config with no timeout, then it seems like you are simply booting that partition directly.  This does eliminate (I think) the possiblity of editing the kernel command line before booting though. 

At the moment, I only have Arch Linux installed anyway.  So chainloading is not necessary for me at this point.  I "upgarded" to less drive space by adding a second SSD in place of my data/media HDD, since my computer will accept a normal 2.5" drive as well as a mSATA SSD.

Out of curiosity, I know that the US is the only silly country to still be using standard mesaurements.  So does somewhere like Wales, where metric is used, still refer to laptop hard drives as 2.5 inches and desktop hard drives as 3.5 inches?  I have always thought it very silly to use metric for everything in a computer but the drive size.  I guess screen size is that way too (at least in the US).

Offline

#14 2012-11-08 22:31:31

mrrhq
Member
Registered: 2012-11-07
Posts: 18

Re: Problems after installing Arch [SOLVED]

Thanks everyone for responding.

I have followed the instructions correctly and installed Arch Linux successfully. I still have to get mkinitcpio to recognize the LVM volume(s) because I misspelled "dm_mod" as "dm-mod". One time as I was configuring wireless in the chroot environment, it stopped working, so my solution to run wifi-menu out of the chroot and chroot back in again seemed to work.

I thank you folks for the further explanation of the GPT partition layout. I guess 3MB wasted (1MB for GPT and 2MB for BIOS partition) is nothing. I will still use GRUB2 with confidence. I wont try to use the 1MB space unless I'm absolutely sure no data loss will happen again, so that's why I'm backing up my boot directory and LVM on another HDD.

Now I'm onward to configuration.

Thanks everyone for graciously helping.

Offline

#15 2012-11-08 22:35:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Problems after installing Arch [SOLVED]

dm_mod and dm-mod should be equivelent.  Try modprobing both, it works either way. 

I am not sure why you have 1MB for GPT.  The GPT automatically allocates space for itself at the beginning and end of your drive.  So you don't ahve to make anything extra except the 2MB Bios Boot for Grub.  I think what srs5694 was getting at is the fact that with GPT and gdisk's automatic partition alignment, there is a nearly 1MB gap between the partition information and the start of the first partition.  Not something you need worry about though.

(I guess if you really get technical about it, it is in fact "wasting" a bit of space, since it GPT mirrors itself to the end of your disk for recovery purposes)

Offline

Board footer

Powered by FluxBB