LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Slackware64 14.2 dual boot install UEFI GRUB 2 editing/documentation help needed. (https://www.linuxquestions.org/questions/slackware-installation-40/slackware64-14-2-dual-boot-install-uefi-grub-2-editing-documentation-help-needed-4175631549/)

globetrotterdk 06-09-2018 01:00 AM

Slackware64 14.2 dual boot install UEFI GRUB 2 editing/documentation help needed.
 
I have installed a Slackware64 14.2 system on a tower computer with Win 7 already installed. Both systems were installed in UEFI mode. Unfortunately, extlinux after five years (Bugzilla), still doesn't have UEFI support, so I have been forced to use GRUB 2 as boot manager, as the other boot managers available for this setup haven't impressed me. I have always found Grub 2 to be the antithesis of KISS philosophy...

My problem can be divided into three parts:
1) I need to edit the current GRUB 2 entries as I need to add the argument "threadirqs" to the boot command. This is for audio creation/production. In Lilo, it would read like this:
Code:

chooser=simple
delay=1
timeout=1
#
image=vmlinuz
        label=vmlinuz
        read-only
        append="root=/dev/sd<> vga=normal ro threadirqs"

2) As I ran
Code:

# grub-mkconfig -o /boot/grub/grub.cfg
after doing a
Code:

# slackpkg install-new
# slackpkg upgrade-all

apparently, without need, as both the old and the new entries seem to boot fine, I would like to clean things up and remove the old entry.

3) I would like to add the Win 7 install, which is on a separate hard disk, to Grub 2. Unfortunately, there isn't much Slackware documentation on Grub 2, and the commands for finding the UUID for the Win 7 install on the Arch Wiki (where Slackware GRUB 2 users are directed) don't seem to work. In Slackware, the Win 7 system is at /dev/sdc according to GParted.

For bonus points, help with changing the resolution of the GRUB 2 menu would be appreciated, as it is HUGE.

globetrotterdk 06-09-2018 11:13 AM

I decided to go to legacy mode.

Didier Spaier 06-09-2018 05:06 PM

Sorry to be late, but see this post.

globetrotterdk 06-10-2018 04:16 AM

Quote:

Originally Posted by Didier Spaier (Post 5865634)
Sorry to be late, but see this post.

Thanks. It looks like an extremely useful tool. More people should be made aware of it. However, for now, I will try my strategy and see how far I get :)

laprjns 06-10-2018 07:50 AM

Quote:

Originally Posted by globetrotterdk (Post 5865314)
I Unfortunately, there isn't much Slackware documentation on Grub 2, and the commands for finding the UUID for the Win 7 install on the Arch Wiki (where Slackware GRUB 2 users are directed) don't seem to work.

You mean lsblk --fs doesn't work? It works here:

Code:

rich[~]$ lsblk --fs
NAME    KNAME TYPE FSTYPE    SIZE LABEL                    PARTLABEL                    UUID                                PARTTYPE
sda    sda  disk iso9660 698.7G Salix64 fluxbox 14.1beta1                              2014-05-21-17-52-14-42             
├─sda1  sda1  part vfat      300M ESP                      ESP                          9037-2232                            c12a7328-f81f-11d2-ba4b-00a0c93ec93b
├─sda2  sda2  part iso9660  128M Salix64 fluxbox 14.1beta1 Microsoft reserved partition 2014-05-21-17-52-14-42              e3c9e316-0b5c-4db8-817d-f92df00215ae
├─sda3  sda3  part ntfs    116.7G MSRP                      WIN 10                      B00005150004E3E6                    ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
├─sda4  sda4  part ntfs      953M Salix64 fluxbox 14.1beta1                              60DCE13FDCE10FD8                    de94bba4-06d1-4d40-a16a-bfd50179d6ac
├─sda5  sda5  part swap        2G Salix64 fluxbox 14.1beta1 Linux swap                  79ea5ca2-34a3-43ad-9461-000f30f58531 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
├─sda6  sda6  part ext4    24.4G Salix64 fluxbox 14.1beta1 Slint                        1aacd13e-aeac-420e-90f2-5b4c31f334c2 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda7  sda7  part iso9660  78.4G Salix64 fluxbox 14.1beta1                              2014-05-21-17-52-14-42              0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda8  sda8  part ext4      100G OS-1                      Common Home                  2e53f119-efa6-40dd-b2df-1fba1296c03c 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda9  sda9  part xfs      88.8G Salix                    Salix64-14.2                fc97ac59-a196-402f-9c94-ad35d96ccd6b 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda10 sda10 part jfs        50G Salix64 fluxbox 14.1beta1 Salix32_14.2                964e444d-c3e8-426c-a6d7-4b2d27889379 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda11 sda11 part ext4    156.9G Salix64 fluxbox 14.1beta1                              0e51384e-eef5-4baa-a2e9-e0ac3870ca15 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda12 sda12 part ext4      50G Salix64 fluxbox 14.1beta1                              d6e9d3d5-575a-4601-b0f0-c21742fff6c5 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda13 sda13 part iso9660  27.9G Salix64 fluxbox 14.1beta1                              2014-05-21-17-52-14-42             
└─sda14 sda14 part iso9660    2G Salix64 fluxbox 14.1beta1                              2014-05-21-17-52-14-42              516e7cb5-6ecf-11d6-8ff8-00022d09712b
sr0    sr0  rom          1024M

But using lsblk -o NAME,UUID may be less busy
Code:

rich[~]$ lsblk -o NAME,UUID
NAME    UUID
sda    2014-05-21-17-52-14-42
├─sda1  9037-2232
├─sda2  2014-05-21-17-52-14-42
├─sda3  B00005150004E3E6
├─sda4  60DCE13FDCE10FD8
├─sda5  79ea5ca2-34a3-43ad-9461-000f30f58531
├─sda6  1aacd13e-aeac-420e-90f2-5b4c31f334c2
├─sda7  2014-05-21-17-52-14-42
├─sda8  2e53f119-efa6-40dd-b2df-1fba1296c03c
├─sda9  fc97ac59-a196-402f-9c94-ad35d96ccd6b
├─sda10 964e444d-c3e8-426c-a6d7-4b2d27889379
├─sda11 0e51384e-eef5-4baa-a2e9-e0ac3870ca15
├─sda12 d6e9d3d5-575a-4601-b0f0-c21742fff6c5
├─sda13 2014-05-21-17-52-14-42
└─sda14 2014-05-21-17-52-14-42
sr0


colorpurple21859 06-10-2018 01:21 PM

You could edit the linux line of /boot/grub/grub.cfg, but everytime you rerun grub-mkconfig/update-grub you will loose your changes.

The two main grub files that get edited for changes are /etc/default/grub and /etc/grub.d/40_custom and then run grub-mkconfig/update-grub depending on distro.

to update /boot/grub/grub.cfg depends on distro. For Slackware and Arch and a few others use grub-mkconfig.
For debian based distros it is update-grub
for redhat based it is grub2-mkconfig

Quote:

I need to add the argument "threadirqs" to the boot command

The correct way is to edit one of these lines
Code:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash threadirqs"
GRUB_CMDLINE_LINUX="threadirqs"

in
Code:

/etc/default/grub
and then rerun grub-mkconfig. The
Code:

GRUB_DEFAULT=0
in /etc/default/grub is what you would edit to select what menu entry would be the default boot entry.

If your booting more than one or two distros and grub-mkconfig doesn't pick up one of them up you can add an entry in /etc/grub.d/40_custom similar to this for windows7
Code:

menuentry 'windows7'{
set root=(hd2,1)
chainloader +1
}
grub

drive counting starts at 0 and partitions start at 1. other entries can be added similart to what is in /boot/grub/grub.cfg and they will be added to the /boot/grub/grub.cfg when grub-mkconfig is run.


Quote:

For bonus points, help with changing the resolution of the GRUB 2 menu would be appreciated, as it is HUGE.
also done with the /etc/default/grub by uncommenting this line and adjust accordingly
Code:

#GRUB_GFXMODE=640x480

globetrotterdk 06-10-2018 03:35 PM

Quote:

Originally Posted by laprjns (Post 5865797)
You mean lsblk --fs doesn't work?

Ah no. It was these commands:
Code:

# grub-probe --target=fs_uuid esp/EFI/Microsoft/Boot/bootmgfw.efi
and
Code:

# grub-probe --target=hints_string esp/EFI/Microsoft/Boot/bootmgfw.efi

laprjns 06-10-2018 05:13 PM

Quote:

Originally Posted by globetrotterdk (Post 5865916)
Ah no. It was these commands:
Code:

# grub-probe --target=fs_uuid esp/EFI/Microsoft/Boot/bootmgfw.efi
and
Code:

# grub-probe --target=hints_string esp/EFI/Microsoft/Boot/bootmgfw.efi

If the "esp" in those paths are not typos then yes they will not work. Does it work if you use the "efi" in the path. They do here;

Code:

rich[boot]$ grub-probe --target=fs_uuid efi/EFI/Microsoft/Boot/bootmgfw.efi
9037-2232

Code:

rich[boot]$ grub-probe --target=hints_string efi/EFI/Microsoft/Boot/bootmgfw.efi
--hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1


globetrotterdk 06-12-2018 03:15 AM

Quote:

Originally Posted by laprjns (Post 5865944)
If the "esp" in those paths are not typos then yes they will not work. Does it work if you use the "efi" in the path. They do here;

Code:

rich[boot]$ grub-probe --target=fs_uuid efi/EFI/Microsoft/Boot/bootmgfw.efi
9037-2232

Code:

rich[boot]$ grub-probe --target=hints_string efi/EFI/Microsoft/Boot/bootmgfw.efi
--hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1


They aren't typos. They were taken directly from the Arch Wiki. Unfortunately, I am in the middle of reinstalling now, so I can't test the revised versions.

Didier Spaier 06-12-2018 04:20 AM

Quote:

Originally Posted by globetrotterdk (Post 5866456)
They aren't typos. They were taken directly from the Arch Wiki. Unfortunately, I am in the middle of reinstalling now, so I can't test the revised versions.

Looking at this page, what is meant with esp (mind the italics) is actually the mount point of the ESP (the EFI System Partition), which is most often /boot/efi in a running Linux system where it is present.

So in case of Slackware the path should be /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi.

I have checked it with EFI3M.


All times are GMT -5. The time now is 01:06 AM.