Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 with initrd: recovery mode has wrong option
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 443
Location: Canberra Australia

PostPosted: Mon Apr 20, 2015 12:55 pm    Post subject: Grub2 with initrd: recovery mode has wrong option Reply with quote

I am trying to install grub2. I user an initrd. If I automatically create /boot/grub/grub.cfg, the "recovery mode" option inserts "single" at the end of the kernel command line and I can't boot into single user mode. I'd like it to insert "init_opts=1", which is the correct command to enter single user mode. How can I configure grub2 to add this? Is there an option in /etc/default/grub that will do this?

Obviously I don't want to mess around with /boot/grub/grub.cfg because it will get overwritten at some stage.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Mon Apr 20, 2015 1:44 pm    Post subject: Reply with quote

/etc/grub.d/40_custom is provided for preserving user preferences
https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
https://wiki.gentoo.org/wiki/GRUB2
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Robert S
Guru
Guru


Joined: 15 Aug 2004
Posts: 443
Location: Canberra Australia

PostPosted: Tue Apr 21, 2015 11:29 pm    Post subject: Reply with quote

Those documents were not useful. I fixed the problem by changing
Code:
"single ${GRUB_CMDLINE_LINUX}"
to
Code:
"init_opts=1 ${GRUB_CMDLINE_LINUX}"
near the bottom of /etc/grub.d/10_linux. Not an ideal solution because it would risk being overwritten with an update.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum