You are not logged in.
Hello everyone
I have problem to loading Arch linux with Grub.
I following the wiki Grub to install Grub in my laptop(Dell Xps13).
The ESP (EFI System Partition ) is in sda1(I didn't create a new ESP because I still want to boot from Windows 10),my windows 10 is in sda3, Arch linux root
system is in sda5, /home is in sda7.
I followed the Grub wiki and use below command.
1.mount
#mount /dev/sda5 /mnt
#mount /dev/sda7 /mnt/home
# arch-chroot /mnt
#mount /dev/sda1 /boot
2.add GNU/Linux menu entry to /etc/grub.d/40_custom
menuentry "Arch Linux" {
set root=(hd0,5)
linux /boot/vmlinuz
initrd /boot/initrd.img
}
3.install grub and generate grub.cfg
# grub-install --target=x86_64-efi –efi-directory=/boot –bootloader-id=grub
# grub-mkconfig -o /boot/grub/grub.cfg
4.Now after its booted up all,the UEFI boot option has a new option Grub.
I'm getting is this Grub command line screen and it says
" Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions."
grub>
Boot to Windows 10 is still ok but Arch linux is not.
How can I boot with Grub for Arch linux(sda5)?
Thanks for your help!
Last edited by thomas10 (2017-05-19 15:25:50)
Offline
From what I've heard and experienced (I run Arch on an XPS 13 myself), GRUB is difficult if not impossible to set up on this laptop. I recommend using systemd boot as opposed to GRUB as its proven more reliable for this computer.
"Full disclosure, I'm drunk right now. And if you can't handle that, you can't handle science."
Offline
From what I've heard and experienced (I run Arch on an XPS 13 myself), GRUB is difficult if not impossible to set up on this laptop. I recommend using systemd boot as opposed to GRUB as its proven more reliable for this computer.
Thank you for your reply. BlahBlahBlase. I will try systemd boot as you said if the GRUB is still not working for my XPS13.
Offline
Today I regenerated grub.cfg again as below command
# grub-mkconfig -o /boot/grub/grub.cfg
The grub menu appears Arch Linux as menu entry which I added.
But when I clicked it, it shows
error: no such partition.error: you need to load the kernel first . Press any key to continue
Please help, thank you
Offline
Is there any reason you have a /etc/grub.d/40_custom file?
Running grub-mkconfig should automatically generate your Arch Linux entry, have you tried without 40_custom?
Offline
Is there any reason you have a /etc/grub.d/40_custom file?
Running grub-mkconfig should automatically generate your Arch Linux entry, have you tried without 40_custom?
The reason I add a /etc/grub.d/40_custom is because my "Arch Linux" installed in sda5,but my ESP (EFI System Partition ) is in sda1(I didn't create a new ESP because I still want to boot from Windows 10),my windows 10 is in sda3, Arch linux root system is in sda5, /home is in sda7.
My solution to link ESP(sda1) to my new installed Arch linux(sda5) is create a 40_custom file.
Thanks slithery.
Offline
You still don't need that file.
If you have sda5 mounted as / and sda1 mounted as /boot then grub will automatically generate the correct configuration.
Offline
I also have the Dell xps 13, but experienced no issues in setting up GRUB, so it should work properly.
Could you post the contents of your fstab?
Did you ever run Arch Linux on this laptop? If not, could you check whether secure boot is disabled in the bios? I got a lot of weird issues when enabled, so it is worth a try (and fast to check).
Offline
I also have the Dell xps 13, but experienced no issues in setting up GRUB, so it should work properly.
Could you post the contents of your fstab?
Did you ever run Arch Linux on this laptop? If not, could you check whether secure boot is disabled in the bios? I got a lot of weird issues when enabled, so it is worth a try (and fast to check).
Dear LaurentvdB
Thanks for your reply. I confirmed that secure boot is disabled . On the other hand ,below is my fstab after execute arch-chroot /mnt.Please let me know if you want further information.
my fstab as below
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda5
UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f / ext4 rw,relatime,data=ordered 0 1# /dev/sda7
UUID=4f609664-d6cb-4eeb-93f4-16236a33531d /home ext4 rw,relatime,data=ordered 0 2
Offline
You still don't need that file.
If you have sda5 mounted as / and sda1 mounted as /boot then grub will automatically generate the correct configuration.
Dear slithery
I wish the grub would automatically generate the correct configuration, but for my current situation. It's not. I don't know what's wrong.
Offline
LaurentvdB wrote:I also have the Dell xps 13, but experienced no issues in setting up GRUB, so it should work properly.
Could you post the contents of your fstab?
Did you ever run Arch Linux on this laptop? If not, could you check whether secure boot is disabled in the bios? I got a lot of weird issues when enabled, so it is worth a try (and fast to check).
Dear LaurentvdB
Thanks for your reply. I confirmed that secure boot is disabled . On the other hand ,below is my fstab after execute arch-chroot /mnt.Please let me know if you want further information.
my fstab as below#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda5
UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f / ext4 rw,relatime,data=ordered 0 1# /dev/sda7
UUID=4f609664-d6cb-4eeb-93f4-16236a33531d /home ext4 rw,relatime,data=ordered 0 2
The /boot partition is not in your fstab. Could you regenerate your fstab with genfstab and post the output of that command? To do this, mount all necessary partitions to /mnt (i.e. /mnt, /mnt/home, /mnt/boot, do not forget the last one!) and then run genfstab -U /mnt. Typically this is done before a chroot. See the wiki for more information.
Offline
The /boot partition is not in your fstab. Could you regenerate your fstab with genfstab and post the output of that command? To do this, mount all necessary partitions to /mnt (i.e. /mnt, /mnt/home, /mnt/boot, do not forget the last one!) and then run genfstab -U /mnt. Typically this is done before a chroot. See the wiki for more information.
Dear LaurentvdB
I follow your suggestion and read the wiki
mount /dev/sda5 /mnt
mount /dev/sda7 /mnt/home
mount /dev/sda1 /mnt/boot
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
cd /dev
cat fstab
The result is below. Even I mount sda1 (boot partition) in /mnt/boot, It won't generate sda1 into fstab,just double the sda5(Arch Linux base system) and sda7.Thanks for your reply.
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda5
UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f / ext4 rw,relatime,data=ordered 0 1# /dev/sda7
UUID=4f609664-d6cb-4eeb-93f4-16236a33531d /home ext4 rw,relatime,data=ordered 0 2# /dev/sda5
UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f / ext4 rw,relatime,data=ordered 0 1# /dev/sda7
UUID=4f609664-d6cb-4eeb-93f4-16236a33531d /home ext4 rw,relatime,data=ordered 0 2
Offline
If genstab isn't correctly picking up sda1 then just manually add the correct line to fstab yourself. You can also remove the duplicate entries your fstab now has.
Offline
Is there any reason you have a /etc/grub.d/40_custom file?
Running grub-mkconfig should automatically generate your Arch Linux entry, have you tried without 40_custom?
Hi slithery
Thanks for your help.
I delete the 40_custom,add /boot to fstab, and generate grub again. when I rebooted, it just boot to grub command line.
" Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions."
grub>
Offline
slithery wrote:Is there any reason you have a /etc/grub.d/40_custom file?
Running grub-mkconfig should automatically generate your Arch Linux entry, have you tried without 40_custom?
Hi slithery
Thanks for your help.
I delete the 40_custom,add /boot to fstab, and generate grub again. when I rebooted, it just boot to grub command line." Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions."
grub>
That is clearly not an improvement. Did you fix your fstab before you regenerated grub? Is the Arch Linux menu setting in Grub being detected correctly?
Offline
Would you mind posting your newly generated grub.cfg?
Offline
Are there any error messages when mounting /boot?
What does "sudo ls -R /boot" look like afterwards?
What's the output of "sudo parted /dev/sda print"?
Offline
Would you mind posting your newly generated grub.cfg?
Sure ,the grub.cfg is as below
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 33196e93-c803-4864-9fc4-5c48a3b6b24f
else
search --no-floppy --fs-uuid --set=root 33196e93-c803-4864-9fc4-5c48a3b6b24f
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-33196e93-c803-4864-9fc4-5c48a3b6b24f' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 33196e93-c803-4864-9fc4-5c48a3b6b24f
else
search --no-floppy --fs-uuid --set=root 33196e93-c803-4864-9fc4-5c48a3b6b24f
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-lts.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-33196e93-c803-4864-9fc4-5c48a3b6b24f' {
menuentry 'Arch Linux, with Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-33196e93-c803-4864-9fc4-5c48a3b6b24f' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 33196e93-c803-4864-9fc4-5c48a3b6b24f
else
search --no-floppy --fs-uuid --set=root 33196e93-c803-4864-9fc4-5c48a3b6b24f
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-lts.img
}
menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-33196e93-c803-4864-9fc4-5c48a3b6b24f' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 33196e93-c803-4864-9fc4-5c48a3b6b24f
else
search --no-floppy --fs-uuid --set=root 33196e93-c803-4864-9fc4-5c48a3b6b24f
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-lts-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-33196e93-c803-4864-9fc4-5c48a3b6b24f' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 33196e93-c803-4864-9fc4-5c48a3b6b24f
else
search --no-floppy --fs-uuid --set=root 33196e93-c803-4864-9fc4-5c48a3b6b24f
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-33196e93-c803-4864-9fc4-5c48a3b6b24f' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 33196e93-c803-4864-9fc4-5c48a3b6b24f
else
search --no-floppy --fs-uuid --set=root 33196e93-c803-4864-9fc4-5c48a3b6b24f
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=33196e93-c803-4864-9fc4-5c48a3b6b24f rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom.bk ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Arch linux" {
set root=(hd0,5)
linux /boot/vmlinuz
initrd /boot/initrd.img
}
### END /etc/grub.d/40_custom.bk ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###Last edited by thomas10 (2017-05-19 12:20:24)
Offline
please wrap that in code tags, thank you.
Offline
Are there any error messages when mounting /boot?
What does "sudo ls -R /boot" look like afterwards?
What's the output of "sudo parted /dev/sda print"?
Hi Seth
Before arch-chroot /mnt, I can’t mount /dev/sda1 /mnt/boot
The error message is
“mount : can’t find /dev/sda1 /mnt/boot in /etc/fstab.
But after arch-chroot /mnt, I can mount it on /boot"
sudo ls -R /boot
/boot:
grub
initramfs-linux-fallback.img
initramfs-linux-lts-fallback.img
initramfs-linux-lts.img
initramfs-linux.img
vmlinuz-linux
vmlinuz-linux-lts/boot/grub:
grub.cfg
grub.cfg.example
sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) quit
Offline
please wrap that in code tags, thank you.
I wrap it done. Thanks for your advice
Offline
sudo parted /dev/sda [b]print[/b]mount : can’t find /dev/sda1 /mnt/boot in /etc/fstab.
This kinda looks like you forgot a space (I assume that's a transcript?) or space isn't (for some strange reason) not part of IFS - suspicious enough, though.
The ls -R however is from when /boot is mounted? (confirm by checking the output of just "mount") - I would expect windows having stuff there if it's the ESP
Offline
sudo parted /dev/sda [b]print[/b]mount : can’t find /dev/sda1 /mnt/boot in /etc/fstab.
This kinda looks like you forgot a space (I assume that's a transcript?) or space isn't (for some strange reason) not part of IFS - suspicious enough, though.
The ls -R however is from when /boot is mounted? (confirm by checking the output of just "mount") - I would expect windows having stuff there if it's the ESP
Dear seth
Thanks for your help!, finally. I solved it by repartition and format. Now it works
I think my problem is I mount the boot after arch-chroot /mnt. I should mount the boot before arch-chroot /mnt.
Anyway, Thanks for everybody who replied to me and gave me the guide to install Arch linux on my Dell Xps13. I hope the Post-installation could go smoothly.
Offline