You are not logged in.

#1 2016-01-15 11:39:59

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

This is my first time installation of Arch and I do one mistake.
I have 3 partitions (sda1 - for /boot, sda2 - /, sda3 - /home), but I've mounted only 2 last ones. Next, I do the following actions:

# pacstrap -i /mnt base base-devel
# genfstab -U /mnt > /mnt/etc/fstab
# arch-chroot /mnt /bin/bash
# mkinitcpio -p linux

So at this step I'm stuck and have no idea what to do next. I think I need to "move" already existing /boot folder to sda1 partition. But I don't know how to do it right (eg how to mount and create the fstab entry properly). I've tried to mount the partition by mount /boot /dev/sda1, but get the error:

mount: /boot is write-protected, mounting read-only
mount: /boot is not a block device

Can anyone advice what to do next?

Last edited by timfayz (2016-01-15 11:43:27)

Offline

#2 2016-01-15 11:50:48

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

timfayz wrote:
mount: /boot is write-protected, mounting read-only
mount: /boot is not a block device

Does sda1 contain a filesystem (i.e. did you run mkfs.ext2/4 on it)?

Also, if you want to move the already existing files from /boot to sda1, I suggest mounting it not to /boot, but somewhere else (e.g. /boot_new). Otherwise, the mounted partition would "hide" the files that are already in the /boot directory, which would be annoying, since you want to move them. After you've finished moving the files, you can then remove the content of the old /boot directory, unmount sda1 from /boot_new and mount it to /boot. You then add an entry to /etc/fstab (as an example, this is my fstab line for the boot partition):

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /boot   ext2 defaults  0    2

(of course, the UUID can be found in /dev/disk/by-uuid, and the filesystem type should be adapted to how you've formatted the partition)

EDIT Oh, I see it's a UEFI system. I'm bailing out.

Last edited by ayekat (2016-01-15 12:00:34)


pkgshackscfgblag

Offline

#3 2016-01-15 11:55:17

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

> Does sda1 contain a filesystem (i.e. did you run mkfs.ext2/4 on it)?

Yes, I've formated it as fat32 by running mkfs.fat -F32 /dev/sda1.

Offline

#4 2016-01-15 11:59:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

I assume you want /dev/sda1 to be your $ESP?  In that case keep /boot on the /dev/sda2 and simply:

mkdir /boot/efi
mount /dev/sda1 /boot/efi
...

Where ... is installing your bootloader.  I recommend grub.  See the wiki.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2016-01-15 12:30:33

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

I use Virtualbox at this installation, so BIOS/MBR is my case. Anyway, I can't mount /dev/sda1 anywhere.
Is the problem in partition format (I don't think fat32 should be a problem..)?

Last edited by timfayz (2016-01-15 12:36:06)

Offline

#6 2016-01-15 12:51:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

Typically, these are needed for $ESP on an EFI machine.  I do not know about a VM.  For BIOS, you do not need a fat32 /boot at all.  I think grub wants a 1M partition for GPT partitions... I can't remember, see the wiki.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2016-01-15 13:06:45

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

graysky wrote:

For BIOS, you do not need a fat32 /boot at all.

Are you sure? I heared it's necessary if I need dual-boot.. Am I right?

Offline

#8 2016-01-15 13:14:24

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

Are you sure? I heared it's necessary if I need dual-boot.. Am I right?

*I will not ask why one would want to set up dual-boot in a VM... I will not ask why one would- ...*

If you use GPT for your setup, then yes, you need a special BIOS-boot partition (about 1MB) - you don't need to format it as FAT, though. Or to mount it as /boot.

EDIT You need to mark the partition as BIOS-boot partition (ef02), however.

Last edited by ayekat (2016-01-15 13:18:32)


pkgshackscfgblag

Offline

#9 2016-01-15 13:20:26

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

ayekat wrote:

*I will not ask why one would want to set up dual-boot in a VM... I will not ask why one would want to set up- ...*

I just play around) I like to test the process on VM before do it actually (before I smash my system and stay with no GUI for a while:). Ok, got it sir!)

Offline

#10 2016-01-15 14:50:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

+1 for what ayekat said.  Not FAT32, BIOS-boot.  FAT32 is needed for EFI boards.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2016-01-15 19:08:00

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

Re: Forget to mount /boot partition prior to pacstrap, arch-chroot, mkinit

ayekat wrote:

[You need to mark the partition as BIOS-boot partition (ef02), however.

BIOS boot partitions are only needed for non-UEFI booting using GRUB on a GPT disk wink

The GRUB bootloader lives in the MBR (in part) on a non-GPT disk booting a non-UEFI system.

Offline

Board footer

Powered by FluxBB