LinuxQuestions.org
Review your favorite Linux distribution.
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 07-13-2023, 04:08 PM   #61
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,228

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849

From post 53 ( by the op ) it looks like he repartitioned the drive, if he did it for mbr, the second partition table will be there still. Thats why, yes I believe you can use GPT and lilo, but mbr and a left over partition table may be a problem.
 
Old 07-13-2023, 04:25 PM   #62
Feanor
Member
 
Registered: Sep 2010
Location: Police State
Distribution: Slackware
Posts: 63

Original Poster
Rep: Reputation: 4
OK, so much weirdness follows, but before that, I ran 'parted - l' and got a listing very similar to fdisk -l with three entries: the first my sda1 (single root [and boot] partition with slack installed), the second an empty ntfs data disk left over from the old install (successfully mounted by slackware installer), and the third the usb installer bootdisk.

The first, /dev/sda lists ATA Corsair Neutron (scsi), Partition Type gpt, flags: pmbr_boot, then number, start, end etc. ext4, with name 'LinuxRoot' (that I gave it).

The second, /dev/sdb (an empty ntfs-formatted drive, ssd, not the original windows install drive or partition) is listed as type gpt, with no flags on the drive, but msftdata flag set on the partition.

The third is /dev/sdc, the flash drive boot disk, irrelevant, I would think, to this discussion.


-----

So now the weirdness - after finding the above out, by logging in as root in konsole at the newly-installed kde desktop, and documenting it, I decided to reboot and see if avoiding the kernel panic and getting to the desktop was some kind of fluke, and indeed, I now get kernel panics, and cannot get back to kde (after changing nothing).

So I boot with the flash and get to the beginning of the install process and I say screw it, I'll try grub, so I mount /mnt/sda1 and chroot in and tried to install grub, as per:

https://docs.slackware.com/howtos:sl...ut_uefi#grub_2

I ran grub-install against /dev/sda , and regardless of whether or not I use the --modules=part_gpt option, I get errors about "/proc/devices: fopen failed, no file or [..]" and "warning, this GPT label contains no BIOS Boot partition, embedding will not be possible".

So I said, screw it, and used --force.

Now, I reboot, no usb disk in, and I get a grub prompt, which I have no idea how to use, but no matter which F11 Boot choice I pick with regards to disk, HDD or USB, I get grub controlling the operation, be it to launch the usb installer or the sda1-installed system.

If I pick the usb flash drive with the BIOS drive picker, I get a nice grub menu showing two slack 15.0 options, and I can launch them (but get different console font to previous experience).

However, picking the /dev/sda disk from the BIOS boot menu, leads to the barebones grub prompt, from which I could presumeably launch the supposedly installed kernel. Pressing <up> presents a long list of things too long to fit on one screen and that I cannot scroll back through to examine.

Before installing grub, the one time I successfully accessed the newly-installed OS via usb boot disk, I am pretty sure I used...

boot: huge.s root=/dev/sda1 initrd= ro

... as per the prompt.

It did not work the subsequent time, which makes me wonder about touchy hardware...

Last edited by Feanor; 07-13-2023 at 04:35 PM.
 
Old 07-13-2023, 04:40 PM   #63
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by Feanor View Post
I mount /mnt/sda1 and chroot in and tried to install grub
...
I get errors about "/proc/devices: fopen failed, no file or [..]"
You should have done it like this:
Code:
mount /dev/sda1 /mnt
mkbindmounts
chroot /mnt
That mkbindmounts adds proc, dev, sys in /mnt.
 
Old 07-13-2023, 04:46 PM   #64
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by Feanor View Post
https://docs.slackware.com/howtos:sl...ut_uefi#grub_2
...
"warning, this GPT label contains no BIOS Boot partition, embedding will not be possible".
That grub howto told this: "If you want to use Grub 2, make sure you have a 'BIOS boot partition' (partition type EF02 in gdisk or cgdisk). This can be anywhere on disk though putting it at the start seems sensible. It is recommended that it be at least 1MiB."
 
Old 07-13-2023, 04:51 PM   #65
Feanor
Member
 
Registered: Sep 2010
Location: Police State
Distribution: Slackware
Posts: 63

Original Poster
Rep: Reputation: 4
Hi Petri,

> That grub howto told this: "If you want to use Grub 2, make sure you have a 'BIOS boot partition' [...]

Does this imply grub does not support a single partition on the drive like what has sortof worked with LILO?
 
Old 07-13-2023, 05:03 PM   #66
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
I'm afraid so. lilo fits in a sector but grub2 is larger. I guess it's time to start from the beginning and make two partitions. One little for grub and a large one for linux.
 
Old 07-13-2023, 06:35 PM   #67
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349
Quote:
Originally Posted by Petri Kaukasoina View Post
I'm afraid so. lilo fits in a sector but grub2 is larger. I guess it's time to start from the beginning and make two partitions. One little for grub and a large one for linux.
A little GRUB2 partition could be added as well at the end of disk. It's a 10MB partition with the type BIOS Boot.
 
Old 07-13-2023, 07:09 PM   #68
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,359

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Quote:
Now, I reboot, no usb disk in, and I get a grub prompt,
To get a grub menu that doesn't require an initrd
Boot into the system, uncomment and/or add this to /etc/default/grub:
Code:
GRUB_DISABLE_LINUX_UUID=true
Then run:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
Quote:
So I said, screw it, and used --force.
The --force allows grub to install to the mbr of a gpt drive that doesn't have a bios-boot partition by using blocklists.

Last edited by colorpurple21859; 07-13-2023 at 07:16 PM.
 
Old 07-14-2023, 01:01 AM   #69
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 976

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by Petri Kaukasoina View Post
But the disk is /dev/sda. Wouldn't it be something like /dev/nvme0n1 then?
Yes, on the few machines where I have had NVME giving me trouble to boot with LILO they have been called something else than /dev/sda.

regards Henrik
 
Old 07-14-2023, 08:04 AM   #70
Feanor
Member
 
Registered: Sep 2010
Location: Police State
Distribution: Slackware
Posts: 63

Original Poster
Rep: Reputation: 4
Update: Solved.

I thank everyone involved, LuckyCyborg included (a worthy Black Knight along the path, and a spur) - I have a working system.

In the end, the combination of things offered here that lead to success was a) overcoming the red herring of EFI given the previous install, (b) the 'parted' command to ensure the drive is properly seen, (c) the push to give up on lilo, the old faithful, no long trustworthy in these days of future past, (c.2) not depending on elilo, since ultimately the system is in legacy mode and not using efi (d) grub's need to have a little BIOS partition (code EF02) on the drive separate from the main root partition (default linux type), (e) the need to use the --modules=part_gpt flag on grub-install command to support the gpt partitions (which in itself require moving on from the old fdisk/cfdisk tools). (f) Lastly was enabling a provided-but-commented-out option in /etc/default/grub/ config file, GRUB_DISABLE_LINUX_UUID=true

It turns out I have no 'mkbindmounts' command on my system, but it was not needed as long as I had a small BIOS partition for grub to work with.

I now have grub starting nicely straight after boot, and can choose my installed slackware 15.0 OS. For some reason, this time, the default neuveau drivers allow my screen's full resolution, which it did not the one time it freak-booted. The machine is nice and fast. First time I've had access to eight CPU's. KDE on 15.0 works significantly snappier than it did on my previous at-work experiment on older hardware.

So, thanks again, everyone. I greatly appreciate your patience and knowledge.

Regards

Feanor

Last edited by Feanor; 07-14-2023 at 08:20 AM.
 
1 members found this post helpful.
Old 07-14-2023, 08:16 AM   #71
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Great!

By the way, mkbindmounts is there when you run the install image, for chrooting to the installed linux. You don't need to chroot if you are already in your system. /sbin/mkbindmounts in the install system:
Code:
#!/bin/bash
# Create bind mounts from / to /mnt for /dev/, /proc, and /sys.
# This may be useful for chrooting to a system partition mounted
# on /mnt (for example to run mkinitrd_command_generator.sh or to
# reinstall boot loaders).

mkdir -p /mnt/{dev,proc,sys}
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
 
Old 07-14-2023, 08:22 AM   #72
Feanor
Member
 
Registered: Sep 2010
Location: Police State
Distribution: Slackware
Posts: 63

Original Poster
Rep: Reputation: 4
Petri, re. mkbindmounts: do you foresee some issue with not having run it? Is it once-off at install-time or something I can trigger at any time?
 
Old 07-14-2023, 08:29 AM   #73
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
No problem. I guess you now booted to your new system (with root=/dev/sda2 or similar) and was able to install grub there. I mentioned mkbindmounts when you had booted to the setup image and from there chrooted to the hard drive and got "/proc/devices: fopen failed". That was because you chrooted to a system which had no /proc populated.
 
Old 07-14-2023, 08:43 AM   #74
Feanor
Member
 
Registered: Sep 2010
Location: Police State
Distribution: Slackware
Posts: 63

Original Poster
Rep: Reputation: 4
If I remember correctly, I zapped the drive, repartioned with the two parts; finished the install up until lilo options, then quit to shell, chrooted, and ran the grub install, calling mkbindmounts said no such executable, so I went on with grub-mkconfig. Then edited the GUID option. No major warnings beyond the 'may need to edit fstab' but that I presume is for modifying a changed system, but I went from scratch.

So thanks again.
 
Old 07-14-2023, 08:18 PM   #75
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349
Quote:
Originally Posted by Feanor View Post
If I remember correctly, I zapped the drive, repartioned with the two parts; finished the install up until lilo options, then quit to shell, chrooted, and ran the grub install, calling mkbindmounts said no such executable, so I went on with grub-mkconfig. Then edited the GUID option. No major warnings beyond the 'may need to edit fstab' but that I presume is for modifying a changed system, but I went from scratch.

So thanks again.
Please correct me if I have got from this thread the following information wrong:

I should understand that the stock LILO failed to work in you particular computer sporting a motherboard with socket AM3+ and a 8 cores CPU?

BTW, I am very glad that you have sorted the issue. Good job!
 
  


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
Slackware and SecureBoot ReaperX7 Slackware 166 11-11-2021 05:17 AM
[SOLVED] secureboot and slackware install timsoft Slackware 7 08-23-2021 11:50 AM
Can't get Secureboot to work despite signed kernel adinsx3 Linux - General 5 07-17-2019 05:08 PM
Any secureboot issues with Fedora 19 on Samsung Ultrabook? ggna Linux - Laptop and Netbook 1 07-08-2013 10:41 AM
Please Help !!! - Recieving kernel panics while booting!! Jonescity Slackware 20 01-09-2006 06:06 AM

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

All times are GMT -5. The time now is 11:25 AM.

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