VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Newbie help with Grub2 configuration  (Read 2770 times)

CitizenM

  • Member
  • *
  • Posts: 7
Newbie help with Grub2 configuration
« on: February 24, 2014, 02:16:16 am »

Hello,
Just setting up my Shuttle XS35GTAV3 with VL7.0 SOHO and Grub.

I can start the system by pressing 'e' at the prompt and editing the configuration...

My filesystem is EXT4, so I change insmod to EXT4
I must also change to vga=769

otherwise the system wont boot.  This is ok, but how do I make these changes permanent?  Searched widely but can't find an answer.

Also, does anyone know why when I press F10, sometimes it continues to boot, and sometimes it boots afresh: meaning I have to change the configuration again hoping that when I press F10 it will finish booting?

Thanks,

M.
Logged

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1297
Re: Newbie help with Grub2 configuration
« Reply #1 on: February 24, 2014, 04:44:11 am »

Generally, what you're going through would indicate a borked grub installation as you shouldn't have to specify the file type every time you start the machine.

Is this a default install from SOHO, or did you install Grub from a different source?
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3217
Re: Newbie help with Grub2 configuration
« Reply #2 on: February 24, 2014, 06:33:39 am »

The 'insmod ext2' should cover ext2, ext3 and ext4 partitions, so you should not have to insert that.
To change the default VGA value, edit your /etc/default/grub and you will have to follow the syntax of the "if [ "$GRUB_GFXMODE" ... statement there to add your VGA mode.

CitizenM

  • Member
  • *
  • Posts: 7
Re: Newbie help with Grub2 configuration
« Reply #3 on: February 24, 2014, 12:41:48 pm »

Thanks for your time, folks.

Yes, this is a default VL 7.0 SOHO installation, on a brand new SSD, partitioned by my newbie self using the Gparted tool to 2x EXT4 partitions, one for the root / and one for home /home.

I didn't do anything special at all during install and now, to get it to boot at all, I have to press 'e' at start up, which displays...

Code: [Select]
setparams 'VectorLinux GNU/Linux, Linux 3.2.6'

insmod part_msdos
insmod ext2
set root='(hdo,msdos1)'
search --no-floppy --fs-uuid --set=root f66d0295-24ba-4c37-8509-62fa64cf2dc6
linux16 /boot/vmlinuz-3.2.6 root=/dev/sda1 ro splash=silent vga=788
initrd16 /boot/initrd

I have to change ext2 in the third line to ext4, and vga=788 in the second last line to vga=769: otherwise it will not boot.

This is fine.  I worked this out myself by trial and error and a bit of googling for vga codes.  However I just need some more general advice on how to save this file; what this file is called and where it lives (so I don't need to do these edits for every time I boot).

I did find a file but it had a comment saying not to edit it.  The file which apparently generates it did not allow changes to these particular parameters.  hence I'm a bit stuck.

Any ideas??
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3217
Re: Newbie help with Grub2 configuration
« Reply #4 on: February 24, 2014, 02:18:22 pm »

Grub2 comes with its own config system.  That's why you're not supposed to edit grub.cfg manually, but instead edit the files I pointed you to.  Once you edit those, you run grub-mkconfig -o /boot/grub/grub.cfg (make sure you save a backup copy of the working file before you do this)

CitizenM

  • Member
  • *
  • Posts: 7
Re: Newbie help with Grub2 configuration
« Reply #5 on: February 26, 2014, 05:16:02 am »

Getting there now...

I have managed to alter the grub.cfg permanently so that is great.  Thanks.

However I still have a problem: unless I press 'e' at the Grub prompt to go into edit mode, then press F10/Crtl-X to continue, it still won't boot.

In other words, I don't need to make any changes to the Grub.cfg file, but I DO need to invoke the edit mode on boot up, otherwise the system just hangs and I get a blank screen.

I think this is why I thought that changing ext2 to ext4 helped it to boot a bit further.  But you were right, M0E-lnx, it makes no difference.  It is entering the edit mode that makes it boot.  My question is why?




Logged

CitizenM

  • Member
  • *
  • Posts: 7
Re: Newbie help with Grub2 configuration
« Reply #6 on: February 26, 2014, 01:45:40 pm »

Just had a thought.

I was reading this page...

http://docs.oracle.com/cd/E37670_01/E41138/html/ch04s02.html

...which talks about Grub loading in stages, 1, 1_5, 2.  But stage 1_5 is not used if the filesystem is EXT4

and stage 2 reads boot/grub/grub.cfg

I wonder if I'm not getting to stage 2.  I type...

# cd /boot/grub
# ls *stage1_5

but nothing comes up.  Does VL work differently in this regard?

Thanks in anticipation...

Mike.

Logged

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1297
Re: Newbie help with Grub2 configuration
« Reply #7 on: February 26, 2014, 04:30:45 pm »

That page deals with Grub legacy. We're using Grub2. There are some rather big differences between the two.
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz