You are not logged in.

#1 2011-08-09 12:45:20

psyxxxx
Member
Registered: 2011-05-31
Posts: 6

grub2 + gpt + ssd +hdd +dualboot

hey everyone,
i'm watching the forum for quite a while now and i really like it, u guys are great.

my problem is that i cant get grub2 to work.

i got a new lenovo t420 with a ssd and a hdd.

here is my partitioning BEFORE i run the /arch/setup:

sda:  (mbr-style partitioned via fdisk) --> hdd
sda1: windows7 boot
sda2: windows7 os
sda3: arch_home --> ext4
sda5: arch_swap --> swap
sda6: arch_var --> ext4

sdb: (gpt-style partitioned via gdisk) --> ssd
sdb1: 1MB ef02 --> none
sdb2: 100MB arch_boot --> ext4
sdb3: arch_root --> ext4

i did not set any boot flag on the sdb. was that a mistake?

afterwards i run the installer and directly set mountpoints and the above mentiones ext4 formating. i did not partition anything at that time again.
i skipped the bootloader step to install grub2 afterwards and exited the installer.
i seemed to be a successfull installation, although the installer mentioned i skipped the set clock step which i didnt. anyone knows why?

after that i followed the gru2 wiki entry. i chrooted to the installed system.
after trying to modprobe dm-mod and nothing happend i installed the grub2-bios package.
when i again tried to modprobe dm-mod it fails with:
FATAL: Could not load /lib/modules/2.6.39-ARCH/modules.dep: no such file or directory

i did:
# grub_bios-install --boot-directory=/boot --no-floppy --recheck /dev/sda
# cp /usr/share/grub/{unicode.pf2,ascii.pf2} /boot/grub/
and everything seemed to be fine. afterwards i generated  a grub.cfg file which looks totally different to the one described in the wiki. why is that?
i did not edit this file. is that ok?

after a reboot and picking the ssd as my booting device, nothing happend, means grub2 doesent appear.

what did i do wrong? i've read a bunch of entries in the wiki and the forum but nothing seems to work.

Offline

#2 2011-08-09 15:58:21

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: grub2 + gpt + ssd +hdd +dualboot

Post the output of

grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sda

and also your generated grub.cfg  file.

Last edited by skodabenz (2011-08-09 15:59:08)


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#3 2011-08-10 11:30:25

psyxxxx
Member
Registered: 2011-05-31
Posts: 6

Re: grub2 + gpt + ssd +hdd +dualboot

i'll post it in a few hours, because i do not have physikal access right now.

but for now :
i did:
grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sdb   <-- sdb not sda posted it wrong above! was that a mistake?

EDIT: ok i had access to the maschine. here is the stuff u've needed:

grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sdb 
Installation finished. No error reported.

i hope u have just needed this last line. there where just a few things printed but i just did grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sdb > file.txt
and only the line i've posted above was written.

here's my grub.cfg:

/boot/grub/grub.cfg

  1 #
  2 # DO NOT EDIT THIS FILE
  3 #
  4 # It is automatically generated by grub-mkconfig using templates
  5 # from /etc/grub.d and settings from /etc/default/grub
  6 #
  7 
  8 ### BEGIN /etc/grub.d/00_header ###
  9 insmod part_gpt
 10 insmod part_msdos
 11 if [ -s $prefix/grubenv ]; then
 12   load_env
 13 fi
 14 set default="0"
 15 if [ "${prev_saved_entry}" ]; then
 16   set saved_entry="${prev_saved_entry}"
 17   save_env saved_entry
 18   set prev_saved_entry=
 19   save_env prev_saved_entry
 20   set boot_once=true
 21 fi
 22 
 23 function savedefault {
 24   if [ -z "${boot_once}" ]; then
 25     saved_entry="${chosen}"
 26     save_env saved_entry
 27   fi
 28 }
 29 
 30 function load_video {
 31   insmod vbe
 32   insmod vga
 33   insmod video_bochs
 34   insmod video_cirrus
 35 }
 36 
 37 set menu_color_normal=light-blue/black
 38 set menu_color_highlight=light-cyan/blue
 39 
 40 insmod part_gpt
 41 insmod ext2
 42 set root='(hd1,gpt3)'
 43 search --no-floppy --fs-uuid --set=root ba384070-afc6-481d-8935-c207fd762ace
 44 if loadfont /usr/share/grub/unicode.pf2 ; then
 45   set gfxmode=auto
 46   load_video
 47   insmod gfxterm
 48   insmod part_gpt
 49   insmod ext2
 50   set root='(hd1,gpt2)'
 51   search --no-floppy --fs-uuid --set=root 4bdee348-29ed-4b83-95a8-c592c6b38f41
 52   set locale_dir=($root)/grub/locale
 53   set lang=en_US
 54   insmod gettext
 55 fi
 56 terminal_input console
 57 terminal_output gfxterm
 58 set timeout=5
 59 ### END /etc/grub.d/00_header ###
 60 
 61 ### BEGIN /etc/grub.d/10_linux ###
 62 menuentry 'Arch Linux, with Linux linux' --class archlinux --class gnu-linux --class gnu --class os {
 63     load_video
 64     set gfxpayload=keep
 65     insmod gzio
 66     insmod part_gpt
 67     insmod ext2
 68     set root='(hd1,gpt2)'
 69     search --no-floppy --fs-uuid --set=root 4bdee348-29ed-4b83-95a8-c592c6b38f41
 70     echo    'Loading Linux linux ...'
 71     linux   /vmlinuz-linux root=UUID=ba384070-afc6-481d-8935-c207fd762ace ro  quiet
 72     echo    'Loading initial ramdisk ...'
 73     initrd  /initramfs-linux.img

 74 }
 75 menuentry 'Arch Linux, with Linux linux Fallback' --class archlinux --class gnu-linux --class gnu --class os {
 76     load_video
 77     set gfxpayload=keep
 78     insmod gzio
 79     insmod part_gpt
 80     insmod ext2
 81     set root='(hd1,gpt2)'
 82     search --no-floppy --fs-uuid --set=root 4bdee348-29ed-4b83-95a8-c592c6b38f41
 83     echo    'Loading Linux linux ...'
 84     linux   /vmlinuz-linux root=UUID=ba384070-afc6-481d-8935-c207fd762ace ro  quiet
 85     echo    'Loading initial ramdisk ...'
 86     initrd  /initramfs-linux-fallback.img
 87 }
 88 ### END /etc/grub.d/10_linux ###
 89 
 90 ### BEGIN /etc/grub.d/20_linux_xen ###
 91 ### END /etc/grub.d/20_linux_xen ###
 92 
 93 ### BEGIN /etc/grub.d/20_memtest86+ ###
 94 ### END /etc/grub.d/20_memtest86+ ###
 95 
 96 ### BEGIN /etc/grub.d/30_os-prober ###
 97 ### END /etc/grub.d/30_os-prober ###
 98 
 99 ### BEGIN /etc/grub.d/40_custom ###
100 # This file provides an easy way to add custom menu entries.  Simply type the
101 # menu entries you want to add after this comment.  Be careful not to change
102 # the 'exec tail' line above.
103 ### END /etc/grub.d/40_custom ###
104 
105 ### BEGIN /etc/grub.d/41_custom ###
106 if [ -f  $prefix/custom.cfg ]; then
107   source $prefix/custom.cfg;
108 fi
109 ### END /etc/grub.d/41_custom ###

Last edited by psyxxxx (2011-08-10 12:11:04)

Offline

#4 2011-08-10 18:20:03

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: grub2 + gpt + ssd +hdd +dualboot

Definitely --debug should have given a verbose output. Can you try without redirecting output to file.txt? BTW your grub.cfg looks ok. I think the problem is in grub_bios-install .


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#5 2011-08-10 22:04:29

psyxxxx
Member
Registered: 2011-05-31
Posts: 6

Re: grub2 + gpt + ssd +hdd +dualboot

hm, was it correct to install grub2 to sdb??

i'll try to post the verbose output generated by grub_bios-install. any tipps telling me how to do? can i somehow copy the verbose output??

EDIT: Could it be possible that i have to update my bios or that there is some bios depending issue in general?

Last edited by psyxxxx (2011-08-10 23:24:27)

Offline

#6 2011-08-11 09:39:17

psyxxxx
Member
Registered: 2011-05-31
Posts: 6

Re: grub2 + gpt + ssd +hdd +dualboot

ok updating the bios didn't change anything.
i've rechecked if the dm-mod module was loaded and it is NOT.

modprobe dm-mod

tells me

FATAL: Could not load /lib/modules/2.6.39-ARCH/modules.dep: No such file or directory

of course there is no 2.6.39-ARCH, because i'm using kernel 3.0. why  isn't modprobe referencing the /lib/modules/3.0-ARCH/ directory??

EDIT: aah sry for double posting

Last edited by psyxxxx (2011-08-11 09:40:07)

Offline

#7 2011-08-11 10:34:32

defears
Member
Registered: 2010-07-26
Posts: 218

Re: grub2 + gpt + ssd +hdd +dualboot

I reinstalled my eeepc with a ssd a few days ago and even though there was no output of modprobe dm-mod it was loaded. The fatal error means it's already loaded. If you rmmod dm-mod, it should say nothing also. Which means is unloaded. It's weird with no way of knowing it loaded. Sorry, I don't dualboot.

ERROR: Module dm_mod does not exist in /proc/modules

This is what I get on a computer without grub2.

Offline

#8 2011-08-11 12:23:26

psyxxxx
Member
Registered: 2011-05-31
Posts: 6

Re: grub2 + gpt + ssd +hdd +dualboot

after grub2 totally pisses me of right now, i've decided to reinstall arch and just follow the installer of the latest test iso 2011.08.06 which contains syslinux in its intall setup.
are there any differences in partitioning my harddrives?
i've read i wouldnt need the ef02 partitioned 1MB partition. do i have to set a boot flag for the /boot this time? it wasnt needed with grub2.

EDIT: ok after a fresh install of archlinux with syslinux instead of grub2 i do have the exact same problem. i've just followed the arch setup on the latest test iso. the whole installation seems to be
succesfull. at the last step the installer asked me to set the boot flag and install it in the mbr. i just confirmed and thats it.
i tool a look at the syslinux.cfg and what i've noticed was that there is still vmlinuz26 instead of the new vmlinuz-linux and some other kernel26 related stuff. is that ok?

i'm probably going to chroot into the fresh system and gonna pacman -Syu, altough i've read somewhere that this shouldnt be done before the first reboot. what do u think?

i'm really stuck right now. i think it's somehow kernel3.0 or bios depending. don't really know what i can do anymore.

thx @ all

Last edited by psyxxxx (2011-08-11 13:20:25)

Offline

#9 2011-08-11 20:54:12

defears
Member
Registered: 2010-07-26
Posts: 218

Re: grub2 + gpt + ssd +hdd +dualboot

Sdb2, which is ext4, will not work with grub1.  Needs to be ext2. Boot flag for sdb2 only. (I think.)

The point of grub2 to me was having 1 MB for grub2 and the rest (64 gig), one ext4 partition for root, to maximize space.

Offline

#10 2011-08-11 23:15:01

psyxxxx
Member
Registered: 2011-05-31
Posts: 6

Re: grub2 + gpt + ssd +hdd +dualboot

hm i wasn't intend to use grub1. grub2 accepts ext4. i'm pretty shure about that.

forget about grub2. i think i wanna try syslinux, because of not being so bloaty.

i've repartitioned my ssd. now i have:

sdb  (which is my ssd):
sdb1 --> 100MB /boot (ext4)
sdb2 --> 50GB / (ext4)

sda (which is a hdd)
sda1 --> windows boot partition 1GB
sda2 --> windows7 os  100GB
sda3 --> /home (ext4)
sda5 --> /swap (swap)
sda6 --> /var (ext4)

like i've mentioned before, i've followed the arch setup of the latest test iso 2011.08.06 which didnt show any errors during installation. at the last step the installer asked me to install syslinux to a partiton (although didnt tell me to which) and to set the boot flags. i just confirmed.
my ssd is gpt partitioned and my hdd is mbr like partitioned.

EDIT: ok i made my arch linux boot with syslinux today.  i did switch the boot partition from the ssd to the hdd using mbr on the hdd now. after setting the bootflag and changing some entries of the
syslinux.cfg to new kernel 3.0  stuff. but why doesent it work when i did install syslinux to my ssd?? i think it somehow belongs to not having set a bootflag on it.
i've tried

 sgdisk /dev/sda --attributes=1:set:2
sgdisk /dev/sda --attributes=1:show

and the output was

1:2:1 (legacy BIOS bootable)

so the bootflag should have been set shouldnt it?

Last edited by psyxxxx (2011-08-12 11:54:57)

Offline

Board footer

Powered by FluxBB