Need help setting up bootloader (gpt table on bios motherboard)
Hi, I have two hard disks on my PC. One is with a msdos table and Windows installed on it. I am trying to setup Slackware on The other HD with a gpt table. I did that before and ir was straightfoward: LILO installed fine. However I am not having luck now. LILO setup doesn't complete, it fails to detect Windows properly, it fails to install. I even tried grub but ir didn't work either. When I was trying to setup grub my partition scheme was the following:
/dev/sdb1 - first 2MiB for grub /dev/sdb2 512 MiB swap /dev/sdb3 25GiB for root (with btrfs) /dev/sdb4 rest of the harddisk for /home Currently I have nothing on that harddisk, looking forward to try it again tomorrow. Followed this tutorial on my attemps. |
First off let's review your partition scheme:
Quote:
The next question is, how much system RAM do you have, and are you going to be compiling stuff regularly? 512MB is rather small for swap. Unless you have more than 8GB of RAM, you should at least use 2GB at least, with no more than 8GB for swap if you'll be building a lot of software. There's no benefit to going past 8GB of swap though. If you're system has enough RAM, then you'll need less swap space, but generally the recommended average and minimum I've seen personally is 2GB. Next, btrfs is risky to use still**, you will need a ext2/3/4 formatted /boot partition, however, to use btrfs as /(root). Personally, you could get away with using JFS with just as good a result, so you've been warned. There have been reports of btrfs causing a failure during the installation of Slackware. I have seen and witnessed it firsthand with the 14.1 install, so user beware. You should dedicate at least 50GB to /(root) for growth purposes, especially logs and the aspect of Copy-on-Write shadow copies taking up a deal of space. /home is fine, but if you have multiple users, you should think about quotas. Technically, you should have this: Code:
/dev/sdb1 - 25MB - EXT2 - /boot partition **If anything wait until the next release of Slackware to use BtrFS. The current version in 14.1 is not classed as Stable. Now let's move onto Grub. You first should setup Grub as follows as root: Code:
mkdir -pv /boot/grub Next, run this as root: Code:
grub-mkconfig -o /boot/grub/grub.cfg Code:
Slackware 14.1 Then finalize it by running: Code:
grub-install /dev/sdb From what I do know, LILO does have some problems at times with certain setups. I don't know the details, but I do know Grub does in fact work a lot better in some cases when LILO has issues. |
OH, I forgot to mention: I do have a /boot partition
I basically copied the scheme from Gentoo Handbook. Also, I have only 4GB of RAM but my system rarely uses swap and when it needs it uses zram so, to be honest, I don't even think I need swap at all. Anyways, isn't a way to make LILO work worh this? ELILO? Does it have/need some special partition like Grub? |
I've done very little with eLILO honestly, but I do know Grub does work because I have a near identical setup:
My partition layout is: /dev/sdb1 - ext2 - 25MB - /boot - also has noauto in fstab to keep it from being automatically mounted. /dev/sdb2 - ef02 - 2MB - bios_boot /dev/sdb3 - swap - 8GB - swap (I do a lot of building and only have 4GB RAM, so it helps) /dev/sdb4 - jfs - 50GB - /(root) /dev/sdb5 - zpool/zfs - 425GB - /home using zfs-on-linux. I think, if I remembered correctly, LILO worked best with MBR partition schemes because it wrote to the MBR. eLILO, I don't know, but I do know it does support EFI partitioning. |
It worked, my partition scheme is the following:
Code:
root@slack:~# parted -a optimal /dev/sdb Code:
# mkdir -pv /boot/grub I just have a minor issue involving os-prober, sometimes it hangs and it puts all kernels (huge and generic) in the grub menu. So far so good. I liked LILO better but eventually I will get used to this. |
Check out documentation on how to setup an /etc/default/grub configuration file as well. You can use it to add graphics, themes, fonts, framebuffer modes, etc.
|
Well, I want LILO back. This thing has too many options, configurations, etc
|
Quote:
Oh and don't try elilo, it can't make boot sectors, it provides EFI bootloader files instead, so it only targets EFI firmwares, not BIOS. |
Grub can be simple or complex. It's up to you. Personally, I just use it with the default settings, so no fuss.
And editing /boot/grub/grub.cfg isn't hard once you see they layout. It's basically a script of sorts. It looks intimidating, but honestly, it's easy, possibly less a headache than LILO. I have used these in the past though for /etc/default/grub: GRUB_TIMEOUT="10" GRUB_TERMINAL_INPUT="console" GRUB_TERMINAL_OUTPUT="gfxterm,console" GRUB_CMDLINE_LINUX="" GRUB_VIDEO_BACKEND="vbe" GRUB_GFXMODE="1024x768" GRUB_GFXPAYLOAD_LINUX="keep" These gave me a nice bootup with the framebuffer console set similar to LILO's vga=792 mode, and 10 second timer for boot selections. If you need more explanations, check this website: https://www.gnu.org/software/grub/ma...iguration.html One suggestion, edit your /boot/grub/grub.cfg file where the kernel is: /boot/vmlinuz-#insert_name# to simply use the /boot/vmlinuz symlink so you never have to rerun Grub when you update your kernel before you install it to the boot sector. It saves a lot of time and headaches. |
Finally I'm digging in and learning more about GRUB, it's kind of fun trying to make it do what I want. I made this crude edit so to see the kernel version on the menu, like "Slackware-14.1-3.10.17" Is there a more elegant way?
Code:
GRUB_DISTRIBUTOR=$( echo -n "`sed 's/Slackware /Slackware-/' /etc/slackware-version`-" && uname -r ) |
Quote:
And thanks again Reaper :D I will take a look at it when I have more time. |
Quote:
Code:
$( echo -n "$(sed 's/Slackware /Slackware-/' /etc/slackware-version)-" && uname -r ) |
All times are GMT -5. The time now is 09:43 PM. |