LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-10-2013, 06:15 AM   #1
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Bug with Slackware64-14.1 and Grub2(UEFI)


Not a bug in the sense that it doesnt work, and not with Grub either

The thing is that Grub attaches the ramdisk both to the huge kernel and the generic one, and more-over the huge kernel is loaded by default (because of naming perhaps? (h>g)), so it gives warnings(errors?) about the modules (already)loaded, but it boots without any problems.

I solve it by manually editing /boot/grub/grub.cfg and replacing huge with generic in the default option.

Dont know what could be done about this...
 
Old 12-10-2013, 06:28 AM   #2
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
The (default)entries are like:

Code:
menuentry 'Slackware-14.1 GNU/Linux'
        echo    'Loading Linux 3.10.17 ...'
        linux   /boot/vmlinuz-huge-3.10.17 root=UUID=c17b4f39-728a-4a28-88a0-a1007c762a89 ro  acpi_backlight=vendor
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.gz

submenu 'Advanced options for Slackware-14.1 GNU/Linux'

         menuentry 'Slackware-14.1 GNU/Linux, with Linux 3.10.17'
                echo    'Loading Linux 3.10.17 ...'
                linux   /boot/vmlinuz-huge-3.10.17 root=UUID=c17b4f39-728a-4a28-88a0-a1007c762a89 ro  acpi_backlight=vendor
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.gz

          menuentry 'Slackware-14.1 GNU/Linux, with Linux 3.10.17'
                linux   /boot/vmlinuz-generic-3.10.17 root=UUID=c17b4f39-728a-4a28-88a0-a1007c762a89 ro  acpi_backlight=vendor
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.gz
So to sum up:

1.) How to make it use the generic-kernel by default when updating-grub(grub-mkconfig -o /boot/grub/grub.cfg)

2.) How to stop it automatically attaching an initrd to the huge kernel

(besides editing the grub-config file by hand )
 
Old 12-10-2013, 03:37 PM   #3
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
If you can live without the huge kernel, just use removepkg & get rid of it, then run "grub-mkconfig -o /boot/grub/grub.cfg" again & only the generic kernel will be found.

I don't like the above option, so I copy the applicable portions of grub.cnf to "/etc/grub.d/40_custom." I then edit 40_custom to whatever I want, make it executable then make 10_linux, 20_linux_xen & 30_os-prober unexecutable. Then I rerun "grub-mkconfig -o /boot/grub/grub.cfg" & all that shows up is what in 40_custom. The 40_custom that I am currently using is

Code:
exec tail -n +3 $0
# 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 'Slackware-Current Desktop' --class slackware-14.0 --class gnu-linux 
--class gnu --class os {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        linux   /generic root=LABEL=current ro 4
        initrd  /initrd.gz
}
menuentry 'Slackware-Current Command Line' --class slackware-14.0 --class 
gnu-linux --class gnu --class os {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        linux   /generic root=LABEL=current ro
        initrd  /initrd.gz
}
submenu 'Advanced options for Slackware-14.0 GNU/Linux' {
        menuentry 'Slackware-Current Huge' --class slackware-14.0 --class 
gnu-linux --class gnu --class os {
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt2'
                linux   /huge root=LABEL=current ro  
        }
        menuentry 'Slackware-Current Generic (recovery mode)' --class 
slackware-14.0 --class gnu-linux --class gnu --class os {
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt2'
                linux   /generic root=LABEL=current ro single 
                initrd  /initrd.gz
        }
        menuentry 'Slackware-Current Huge (recovery mode)' --class 
slackware-14.0 --class gnu-linux --class gnu --class os {
                insmod part_gpt
                insmod ext2
                set root='hd0,gpt2'
                linux   /huge root=LABEL=current ro single 
        }
}
Since I'm using an initrd, I can do several things that make this easier:
1) I do not have to modify inittab, I can just put "4" at the end of the kernel
options, when I want to go to runlevel 4.
2) I use links, generic & huge (in /boot), to the respective kernels.
3) I use partition labels instead of paths for my root partition.
Using the above, I can usually upgrade a kernel without modifying grub.cnf at all.

Regards,
Bill
 
Old 12-11-2013, 02:12 AM   #4
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
Thanks Bill

I have also found an answer here.

I copied the above script and saved it as described, then made 10_linux unexecutable and made 09_slackware executable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Edit: CAN boot into uefi from official slackware64 dvd! Phorize Slackware 8 11-30-2013 03:48 PM
[SOLVED] Slackware64-14.1 doesnt boot on UEFI aaditya Slackware 2 11-13-2013 12:56 PM
[SOLVED] Slackware64 + UEFI - Random freezing slaka Slackware 3 05-06-2013 06:22 PM
Slackware and Grub2 - getting a UEFI mb running linuxbird Slackware 16 12-13-2012 08:40 AM
Grub2 and slackware64 13.37 Locklear Slackware 5 05-02-2011 08:22 AM

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

All times are GMT -5. The time now is 06:25 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