You are not logged in.
Hi All,
I'm new to Arch Linux and have just managed to install it on my T530 Lenovo laptop along side a pre-existing Ubuntu installation.
However, although I did consult the dual boot posting and article here on the site beforehand, those articles seemed to be about installing Grub. Since I already have it up and working, I was nervous about deleting it and so potentially loosing my working Ubuntu installation.
I tried installing mounting my pre existing /boot/efi partition but the pre-existing vmlinuz-linux file (no doubt from my Ubuntu installation) prevented it from working. My solution was to create the boot folder on the same partition as my Arch installation.
I now have an installation that works (kind of) however, it appears each time I boot up, I have to edit the Grub entry for my Arch installation to update the UUID Grub points to to get it to load up Arch. I can't find where the actual file being loaded in Grub resides (the file that it appears generates this script, is itself built from a series of predefined variables).
I admit I am playing at the moment - I'm keen to get to grips with this distro and am up for considering all options including deleting and starting again to learn to get it set up correctly. My questions are:
How should I have done this so that my Arch linux distro was loaded via Grub called by the UEFI and had the same booting file structure as the already existing Ubuntu installation (using the BOOTLOADER partition and the /boot/efi folders on it)
How do I edit the Grub file for my Arch distro so it stays edited (no more retyping all the UUIDs each time I load it up
Is there a way to get to the installation I currently have to an the more ideal state
Details taken thanks to the bootrepair application are here:
http://paste.ubuntu.com/10682898/
Thanks and regards,
Simon
Last edited by simon_sjw (2015-04-22 11:50:52)
Offline
Please boot up your Arch system and post your /etc/fstab and the output of:
lsblk -f
You could create a custom menu stanza with the correct UUIDs at the end of the file located at /etc/grub.d/40_custom and run `update-grub` from Ubuntu but you would then have two menu entries for Arch...
Jin, Jîyan, Azadî
Offline
Hi Head_on_a_Stick,
for lsblk -f I have:
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
|-sda1 vfat BOOTLOADER 9360-2939
|-sda2 ext4 Linux_Ubuntu 542bf27c-0fd5-424a-b4d8-107f7cf97b75
|-sda4 ext4 Linux_Arch fa834da1-a35f-4254-a3dd-ba3f4021dc48 /
|-sda5 ext4 Data 5a971a77-685b-43d5-a8e6-c7b407a4c2ff
`-sda6 ext4 Misc_Data b165990d-bd25-458f-b2d6-63fae28d0870
sr0
for fstab I have:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda4 LABEL=Linux_Arch
UUID=fa834da1-a35f-4254-a3dd-ba3f4021dc48 / ext4 rw,relatime,data=ordered 0 1
In my Ubuntu Grub directory (in Ubuntu /etc/grub.d), I have a file 30_os-prober. The file contains far too much to put here without help from a script bin but I was wondering if this might be generating the Arch entry? My understanding is that os-prober is a Debian based application and I used this earlier (before knowing this) to find the Arch setup. Maybe it creates an entry for Arch but kind of stuffs it up because it's not Debian? I thought I might move this out of the directory and see if the Arch entry on startup disappears. if it does, I just have to write a new one. That still leaves the issue of understanding what an optimum Grub UEFI Arch/Ubuntu bootloader file system looks like but I would be a little closer. Happy to hear any thoughts on this if it's worth thinking about.
Thanks for taking the time with this.
Regards,
Simon
Offline
I don't think there are any Ubuntu kernel images on your EFI system partition (they are in /boot, not /boot/efi).
If you want Arch to boot in an EFI system you should mount /boot (rather than /boot/efi) to the EFI system partition.
To do this, copy the /boot folder over to /dev/sda1 and add it to your /etc/fstab (in Arch):
/dev/sda1 /boot vfat rw,relatime,discard,nodev,nosuid,noexec,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
It's probably best to install & configure GRUB from Arch rather than Ubuntu because Arch mounts /boot to the ESP while all other distributions mount /boot/efi so the results may get confusing (ie, GRUB may create menu entries to boot Ubuntu with your Arch kernel and vice versa); also the Arch kernel image is booted read-write whereas most other kernel images are booted read-only.
https://wiki.archlinux.org/index.php/GRUB#UEFI_systems
I find the os-prober script can fail sometimes so this is probably your problem here.
Personally, I use gummiboot to boot my Debian system by copying the kernel image & initial ramdisk to the EFI system partition using these commands in Debian (this would also work in Ubuntu):
# mount /dev/sda1 /mnt
# cp /vmlinuz /initrd.img /mnt
Then I make a gummiboot menu entry; your Ubuntu entry would look like this:
title Ubuntu
linux /vmlinuz
initrd /initrd.img
options root=/dev/sda2 ro
Add any kernel parameters after "ro" and make an entry for Arch as well (you may also need to configure /boot/loader/loader.conf as per the ArchWiki page) & install gummiboot from Arch using:
# gummiboot install
You can then create a post-install script at /etc/kernel/postinst.d/zz-update-gummiboot in your Ubuntu system to copy over the kernel image & initrd to the ESP whenever the kernel is updated:
#!/bin/sh
mount /dev/sda1 /mnt
cp /vmlinuz /initrd.img /mnt/
umount -R /mnt
Make this executable:
# chmod +x /etc/kernel/postinst.d/zz-update-gummiboot
This method will only work if you have /boot mounted to the EFI system partition (as outlined in the Beginner's Guide).
Jin, Jîyan, Azadî
Offline
Hi Head On A Stick
First - sorry about the delay in response to this one.
I did try copying over the /boot folder to /dev/sda1 but cutting a long story short it didn't work. I've reinstalled Arch now using the correct /boot on sda1 to begin with.
However...
On installing, I didn't install gummiboot and shut down my computer (realising my mistake as it shut down). I now have a full Arch distribution on my laptop with the correct images (I assume) in /boot.
Because I don't know how to login to Arch so I can install gummiboot (to enable me to load into Arch) I have instead tried to configure my UEFI firmware to launch Arch directly.
This involved using the command
sudo efibootmgr -d /dev/sda -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sda4 initrd=/initramfs-linux.img"
However, I now get this test output Output from sudo efibootmgr -v
The relevant line is this one (right at the bottom of the pastebin).
Boot001A* Arch Linux HD(1,800,106000,4054bc89-4e32-4253-8d3d-267654549768)File(/vmlinuz-linux)r.o.o.t.=./.d.e.v./.s.d.a.4. .i.n.i.t.r.d.=./.i.n.i.t.r.a.m.f.s.-.l.i.n.u.x...i.m.g..
What gives with all the periods? When I boot up, the BIOS just skips over this and goes for Ubuntu. I can confirm that UEFI is definitely set up.
Which is the best direction to go from here? If there was a way of getting gummiboot or Grub up and getting the Arch install set up, I would readily do it. If you say the best thing to do is just kill this install and start from scratch, I'd consider that too. If you know how to troubleshoot the UEFI entry, I'm all ears.
Thanks and regards,
Simon
Offline
Hi Simon. You can boot back into the Arch install USB to fix install problems. If you have a complete install you can miss the configuration steps you've already done and you can just set up your bootloader.
Mount the installed partitions using the live medium, then chroot into the Arch install on your hard drive and then set up the bootloader of your choice.
Windows dual boot on UEFI "repairs" the EFI partition when it loads (that means it erases any changes that took place outside of Windows), which left me with no access to Arch. So I had to do this a couple of times before I worked out that Windows was causing the problems.
Offline
Windows dual boot on UEFI "repairs" the EFI partition when it loads
To stop Windows doing this use:
bcdedit /set {default} recoveryenabled No
Jin, Jîyan, Azadî
Offline
Yeah, that's fixed now. Installing the bootloader from inside Windows had the same effect.
Offline
Thankyou to you both - I now have a functioning Arch Installation.
Time for fun!
Regards,
Simon
Offline