LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-28-2024, 02:15 AM   #61
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11/Ubuntu (workstations)
Posts: 608

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350

Quote:
Originally Posted by chrisretusn View Post

Installed it? I did. No issues.

Both Debian and OpenSUSE are using the same version in testing.

Those are commits toward the next version release, are you expecting Pat to make a package out of git?

How is grub so hard to maintain? Just install it and start using it. Perhaps you have a special use case that's in one of the commits?

There could be issues that Pat is aware of in Slackware that we are not aware of or it's like Didier Spaier stated.
I just tested it in a virtual machine with/without hardening flags and really I had no problems here.
OpenSUSE Tumbleweed is a rolling release that is constantly updated as Slackware64-current could be.
I don't expect a package from git, but what the hell are we doing with the hundreds of patches for GRUB existing in Debian, Fedora, OpenSUSE, etc. This is what I was referring to when I said that it is difficult to maintain.
Those from Grub hardly cut a release and let the distribution maintainers deal with the necessary patches that appear after the release.
I still have a problem with the official SlackBuild for GRUB.
If I apply hardening flags, I have to use HOST_CFLAGS="-fstack-protector-strong" because the script builds 32/64 bit efi target, then builds regular build and overwrites the above option by disabling it for efi.
Code:
build_grub() {
  EFI_DO="$*"
  # Configure:
  CFLAGS="$SLKCFLAGS" \
  ./configure \
    --prefix=/usr \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --infodir=/usr/info \
    --mandir=/usr/man \
    --disable-werror \
    $EFI_DO || exit 1

  # Build and install:
  make clean || exit 1
  make $NUMJOBS || make || exit 1
  make install DESTDIR=$PKG || exit 1

  # Clear $EFI_DO :
  unset EFI_DO
}

# Build 32bit and 64bit efi targets if requested:
if [ -n "$EFI32_FLAGS" ]; then
  build_grub $EFI32_FLAGS || exit 1
fi
if [ -n "$EFI_FLAGS" ]; then
  build_grub $EFI_FLAGS || exit 1
fi
# Always end with regular build:
build_grub || exit 1
The SlackBuild used by Didier solves the problem in a different way, although he disabled the respective section and removed $ENABLESTACKPROTECTOR from the compilation options.
 
1 members found this post helpful.
Old 01-28-2024, 03:31 AM   #62
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,972

Rep: Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551
Thanks @teoberi for the reply.

Well don't know or really care about Debian or OpenSUSE or the others, only Slackware. I don't apply any hardening so that probably helps. Not a lot of patches in the slackware64-current build. I also testing in a VM first. That how I got to learn grub after Pat announced lilo, elilo would be following the dodo bird. I'm 100% with grub now. Three slackware64-current installs, two BIOS, one EFI and one slackware64-15.0 BIOS install.
 
Old 01-28-2024, 11:16 AM   #63
bigbadaboum
Member
 
Registered: Apr 2023
Posts: 142

Rep: Reputation: 53
*maybe the problem is not related to Grub, maybe someone here has the answer.

Grub 2.12 bios without liblzma: 48.6 MB use at startup
Grub 2.12 bios with liblzma: 47.9 MB use at startup
*Grub 2.12 bios with liblzma after a 15-minute session on youtube(javascipt.enabled) and a reboot: 52MB to use when starting up.
Grub 2.12 bios with liblzma after a 15-minute session offline and a reboot: 47.9 MB use at startup.
 
Old 02-06-2024, 08:07 AM   #64
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Interesting article.

Working on TPM2 support and more.

https://www.phoronix.com/news/GRUB-2024-Plans
 
Old 02-06-2024, 11:52 AM   #65
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,362

Original Poster
Rep: Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075
Quote:
Originally Posted by bigbadaboum View Post
*maybe the problem is not related to Grub, maybe someone here has the answer.

Grub 2.12 bios without liblzma: 48.6 MB use at startup
Grub 2.12 bios with liblzma: 47.9 MB use at startup
*Grub 2.12 bios with liblzma after a 15-minute session on youtube(javascipt.enabled) and a reboot: 52MB to use when starting up.
Grub 2.12 bios with liblzma after a 15-minute session offline and a reboot: 47.9 MB use at startup.
Probably nobody here in 2024, considers a 5MB RAM overload to be a problem
 
Old 03-21-2024, 02:00 PM   #66
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
poke me with a stick.
I never found this thread.
Thanks Marav et all
john
 
1 members found this post helpful.
Old 03-21-2024, 02:02 PM   #67
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,362

Original Poster
Rep: Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075
Quote:
Originally Posted by AlleyTrotter View Post
poke me with a stick.
I never found this thread.
Thanks Marav et all
john
/me slap John with a large trout
 
Old 03-22-2024, 12:05 PM   #68
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 905

Rep: Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694Reputation: 694
I recently installed Slackware 15.0 on a new machine. elilo didn't work (don't know why). I just previously switched from elilo to grub on a different machine to fix an nVidia problem, so I'm a brand new grub user. Anyway, I grabbed the SlackBuild for grub 2.12 and compiled it on Slackware 15.0 and am using it now.

I use an encrypted /, so I needed to make some modifications (after following README_CRYPT.txt). Here is my drive setup (not every drive is listed):
Code:
# lsblk
NAME              MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
sr0                11:0    1 1024M  0 rom   
nvme2n1           259:0    0  1.9T  0 disk  
├─nvme2n1p1       259:1    0  850M  0 part  /boot/efi
├─nvme2n1p2       259:2    0   12G  0 part  
├─nvme2n1p3       259:3    0   61G  0 part  
├─nvme2n1p4       259:4    0    2G  0 part  /boot
├─nvme2n1p5       259:5    0   32G  0 part  
│ └─cryptswap     252:1    0   32G  0 crypt [SWAP]
└─nvme2n1p6       259:6    0  1.8T  0 part  
  └─luksSLACKROOT 252:0    0  1.8T  0 crypt /
Note that nvme2n1 was originally called nvme0n1 before I installed additional NVME drives in the PCIe slots. This motivated me to switch to using labels instead of raw device names (I replaced real UUIDs by "xx-xx" except for the raw root partition I replaced it with "0x-xx" and the decrypted LUKS / partition with "2x-xx"):

Code:
/dev/mapper/cryptswap: UUID="xx-xx" TYPE="swap"
/dev/nvme2n1p6: UUID="0x-xx" TYPE="crypto_LUKS" PARTLABEL="SLACKROOT" PARTUUID="xx-xx"
/dev/nvme2n1p4: UUID="xx-xx" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="xx-xx"
/dev/nvme2n1p2: LABEL="OS" UUID="xx-xx" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="xx-xx"
/dev/nvme2n1p5: UUID="xx-xx" TYPE="swap" PARTUUID="xx-xx"
/dev/nvme2n1p3: LABEL="UBUNTU" UUID="xx-xx" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="xx-xx"
/dev/nvme2n1p1: LABEL_FATBOOT="ESP" LABEL="ESP" UUID="xx-xx" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="xx-xx"
/dev/mapper/luksSLACKROOT: UUID="2x-xx" BLOCK_SIZE="4096" TYPE="ext4"
First I added the following line to /etc/default/grub:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=0x-xx:luksSLACKROOT:allow-discards preempt=voluntary delayacct mitigations=off"
Then after generating /boot/grub/grub.cfg I modified it like so to boot my custom kernel. Whenever I upgrade my kernel I also upgrade the symlinks in /boot.
Code:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Slackware-15.0 GNU/Linux' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-2x-xx' {
	load_video
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root xx-xx
	echo	'Loading Linux current ...'
	linux	/vmlinuz-current root=UUID=2x-xx ro  cryptdevice=UUID=0x-xx:luksSLACKROOT:allow-discards preempt=voluntary delayacct mitigations=off
	echo	'Loading initial ramdisk ...'
	initrd	/initrd-current.gz
}
submenu 'Advanced options for Slackware-15.0 GNU/Linux' $menuentry_id_option 'gnulinux-advanced-2x-xx' {
	menuentry 'Slackware-15.0 GNU/Linux, with Linux current' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-current-advanced-2x-xx' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root xx-xx
		echo	'Loading Linux current ...'
		linux	/vmlinuz-current root=UUID=2x-xx ro  cryptdevice=UUID=0x-xx:luksSLACKROOT:allow-discards preempt=voluntary delayacct mitigations=off
		echo	'Loading initial ramdisk ...'
		initrd	/initrd-current.gz
	}
	menuentry 'Slackware-15.0 GNU/Linux, with Linux current (recovery mode)' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-current-recovery-2x-xx' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root xx-xx
		echo	'Loading Linux current ...'
		linux	/vmlinuz-current root=UUID=2x-xx ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd-current.gz
	}
	menuentry 'Slackware-15.0 GNU/Linux, with Linux previous' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-previous-advanced-2x-xx' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root xx-xx
		echo	'Loading Linux previous ...'
		linux	/vmlinuz-previous root=UUID=2x-xx ro  cryptdevice=UUID=0x-xx:luksSLACKROOT:allow-discards preempt=voluntary delayacct mitigations=off
		echo	'Loading initial ramdisk ...'
		initrd	/initrd-previous.gz
	}
	menuentry 'Slackware-15.0 GNU/Linux, with Linux previous (recovery mode)' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-previous-recovery-2x-xx' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root xx-xx
		echo	'Loading Linux previous ...'
		linux	/vmlinuz-previous root=UUID=2x-xx ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd-previous.gz
	}
	menuentry 'Slackware-15.0 GNU/Linux, with Linux 5.15.145' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.145-advanced-2x-xx' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root xx-xx
		echo	'Loading Linux 5.15.145 ...'
		linux	/vmlinuz-generic-5.15.145 root=UUID=2x-xx ro  cryptdevice=UUID=0x-xx:luksSLACKROOT:allow-discards preempt=voluntary delayacct mitigations=off
		echo	'Loading initial ramdisk ...'
		initrd	/initrd-5.5.145.gz
	}
	menuentry 'Slackware-15.0 GNU/Linux, with Linux 5.15.145 (recovery mode)' --class slackware_15_0 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.145-recovery-2x-xx' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root xx-xx
		echo	'Loading Linux 5.15.145 ...'
		linux	/vmlinuz-generic-5.15.145 root=UUID=2x-xx ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd-5.5.145.gz
	}
I also modified /etc/crypttab, /etc/fstab, and /etc/mkinitrd.conf to use the partition label SLACKROOT:
Code:
# grep SLACKROOT /etc/crypttab
luksSLACKROOT   /dev/disk/by-partlabel/SLACKROOT      none  discard
# grep SLACKROOT /etc/fstab
/dev/mapper/luksSLACKROOT     /                ext4        defaults,discard 1   1
# grep SLACKROOT /etc/mkinitrd.conf
LUKSDEV="/dev/disk/by-partlabel/SLACKROOT"
LUKSTRIM="/dev/disk/by-partlabel/SLACKROOT" # verify support with 'hdparm -I $dev | grep TRIM'
ROOTDEV="/dev/mapper/luksSLACKROOT"
Now when I add another drive (which I will next week...) it won't matter if the raw device name of / changes.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Any feedbacks on Tiscali? Zippelin General 6 05-01-2008 06:23 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
wbel feedbacks pcandpc General 4 05-28-2005 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration