You are not logged in.

#1 2012-01-29 11:39:29

brambi
Member
Registered: 2012-01-29
Posts: 17

[SOLVED]Grub error

Hey guys, thanks for getting me cursing at my windows OS at the registration, anyway.

When installing archlinux everything seemed to go smooth and fine, even the installer said so.

But now when trying to boot it with grub there seems to be a problem, as far as I know sdd = (hd3,0), right?

This is the log:

Booting 'Arch Linux'

root (hd3,0)
Filesystem type unknown, partition type 0x6 (even though cfdisk is giving me sdd1 as an ext4 filesystem?)
kernel / boot/vmlinux-linux root=/dev/sdd1 ro

Error 17: Cannot mount selected partition

Thanks!

EDIT: Here is my menu.lst if that might help

# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# DEVICE NAME CONVERSIONS 
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,1)
#  /dev/sda3       (hd0,2)
#

#  FRAMEBUFFER RESOLUTION SETTINGS
#     +-------------------------------------------------+
#          | 640x480    800x600    1024x768   1280x1024
#      ----+--------------------------------------------
#      256 | 0x301=769  0x303=771  0x305=773   0x307=775
#      32K | 0x310=784  0x313=787  0x316=790   0x319=793
#      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
#      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
#     +-------------------------------------------------+
#  for more details and different resolutions see
#  https://wiki.archlinux.org/index.php/GRUB#Framebuffer_resolution

# general configuration:
timeout   5
default   0
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title  Arch Linux
root   (hd3,0)
kernel /boot/vmlinuz-linux root=/dev/sdd1 ro
initrd /boot/initramfs-linux.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd3,0)
kernel /boot/vmlinuz-linux root=/dev/sdd1 ro
initrd /boot/initramfs-linux-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1

Last edited by brambi (2012-02-01 12:03:18)

Offline

#2 2012-01-29 12:10:46

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Grub error

Are you sure there's no swapping of /dev entries going on between BIOS and Linux? Could you try using UUIDs for GRUB (and ideally for /etc/fstab as well)?

You're sure you have ext4 in your initramfs, if you are sure the partition is ext4? How does your mkinitcpio.conf look like?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-01-29 12:22:09

brambi
Member
Registered: 2012-01-29
Posts: 17

Re: [SOLVED]Grub error

Thanks for replying so fast!

Weird, well when I installed archlinux it was sde, but now when i check cfdisk it's sdd so i changed that in the grub menu (and it's the 4th hard disk in my boot list so that makes sense.)

But when now checking /etc/fstab i get this

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
/dev/sde1 / ext4 defaults 0 1
/dev/sde2 swap swap defaults 0 0

It looks like it's sde? (I'm really confused here, or is that what you mean with swapping entries between bios and linux?)

My mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run first, so it may be used to
# override the actual binaries used in a given hook.
# (Existing files are NOT overwritten if already added)
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
#    FILES="/etc/modprobe.d/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
##   This is identical to the above, except the old ide subsystem is
##   used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev pata mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev autodetect pata scsi sata filesystems usbinput"

# COMPRESSION
# Use this to compress the initramfs image. With kernels earlier than
# 2.6.30, only gzip is supported, which is also the default. Newer kernels
# support gzip, bzip2 and lzma. Kernels 2.6.38 and later support xz
# compression.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

Offline

#4 2012-01-29 12:24:43

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED]Grub error

I had problems with the arch installer creating the proper partition for Arch.  I ended up formatting the partition for Arch by booting Mageia and using MCC (that was on another partition of the same hard drive).  You could probably do the same thing with a Live CD or DVD.

https://bbs.archlinux.org/viewtopic.php?id=128300

Perhaps this could be done with fdisk as well as reported by Mr.Elendig in the thread above.

Offline

#5 2012-01-29 12:41:02

brambi
Member
Registered: 2012-01-29
Posts: 17

Re: [SOLVED]Grub error

David Batson wrote:

I had problems with the arch installer creating the proper partition for Arch.  I ended up formatting the partition for Arch by booting Mageia and using MCC (that was on another partition of the same hard drive).  You could probably do the same thing with a Live CD or DVD.

https://bbs.archlinux.org/viewtopic.php?id=128300

Perhaps this could be done with fdisk as well as reported by Mr.Elendig in the thread above.

Thanks for your reply, but the file system IS ext4 though, I can even open it in windows through ext2fsd? Or isn't that what you mean?

Offline

#6 2012-01-29 12:48:46

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED]Grub error

brambi wrote:
Filesystem type unknown, partition type 0x6 (even though cfdisk is giving me sdd1 as an ext4 filesystem?)

I was looking at the above from your first post.  What does fdisk -l report?

Here is mine for reference.  Arch is on sda7:

# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f14b4bc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2459647     1228800    7  HPFS/NTFS/exFAT
/dev/sda2         2459648   297459711   147500032    7  HPFS/NTFS/exFAT
/dev/sda3       297475605   604659711   153592053+   f  W95 Ext'd (LBA)
/dev/sda4       604659712   625139711    10240000    7  HPFS/NTFS/exFAT
/dev/sda5       297475668   389608379    46066356   83  Linux
/dev/sda6       399863808   502263807    51200000   83  Linux
/dev/sda7       502265856   604659711    51196928   83  Linux
/dev/sda8       389608443   399857849     5124703+  82  Linux swap / Solaris

Partition table entries are not in disk order 

Offline

#7 2012-01-29 13:22:21

brambi
Member
Registered: 2012-01-29
Posts: 17

Re: [SOLVED]Grub error

Thanks for your reply,

This is my fdisk -l dump:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x82ca63ed

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   976771071   488384512    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4cd1e822

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63  1953520064   976760001    7  HPFS/NTFS/exFAT

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4cd1e824

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048   209717247   104857600   83  Linux
/dev/sde2       209717248   234883071    12582912   82  Linux swap / Solaris
/dev/sde3       234883072  1953519615   859318272    7  HPFS/NTFS/exFAT

Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x04d186c1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          63   488394431   244197184+   7  HPFS/NTFS/exFAT

Disk /dev/sdf: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x82ca63e8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *        2048   976771071   488384512    7  HPFS/NTFS/exFAT

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4cd1e823

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          63  1953520064   976760001    6  FAT16

Disk /dev/sdg: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1ec5d283

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1   *          63   625137344   312568641    7  HPFS/NTFS/exFAT

Disk /dev/sdh: 1002 MB, 1002438656 bytes
33 heads, 32 sectors/track, 1854 cylinders, total 1957888 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x95c6168a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1   *          96     1957887      978896    6  FAT16

Disk /dev/sdi: 8000 MB, 8000110592 bytes
160 heads, 19 sectors/track, 5139 cylinders, total 15625216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1   *          32    15625215     7812592    b  W95 FAT32

Disk /dev/mapper/arch_root-image: 608 MB, 608174080 bytes
255 heads, 63 sectors/track, 73 cylinders, total 1187840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/arch_lib-modules: 100 MB, 100663296 bytes
255 heads, 63 sectors/track, 12 cylinders, total 196608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/arch_usr-share: 465 MB, 465567744 bytes
255 heads, 63 sectors/track, 56 cylinders, total 909312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Last edited by brambi (2012-01-29 14:07:38)

Offline

#8 2012-01-29 14:32:46

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED]Grub error

Yep, sdd1 should by type 83 linux.  Instead it is type 6 Fat16.  Same problem I had more or less.  Notice in the thread I linked to, Mr.Elendig said that my partition was probably set to type 6 (as yours is).

Offline

#9 2012-01-29 14:50:25

brambi
Member
Registered: 2012-01-29
Posts: 17

Re: [SOLVED]Grub error

David Batson wrote:

Yep, sdd1 should by type 83 linux.  Instead it is type 6 Fat16.  Same problem I had more or less.  Notice in the thread I linked to, Mr.Elendig said that my partition was probably set to type 6 (as yours is).

Are you sure? Because I just figured out that sdd is actually just a harddisk with some files on it which i can access in windows(no idea why it's fat16 though).

I tried using the UUID method in menu.lst but that still gives me the same error.

# general configuration:
timeout   5
default   0
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title  Arch Linux
root   (hd4,0)
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/e3b04d69-7f5b-4f27-a60b-87b859ec764c ro
initrd /boot/initramfs-linux.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd4,0)
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/e3b04d69-7f5b-4f27-a60b-87b859ec764c ro
initrd /boot/initramfs-linux-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1

This is the correct harddisk(because it's the only harddisk with a ext4 partition):

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4cd1e824

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048   209717247   104857600   83  Linux
/dev/sde2       209717248   234883071    12582912   82  Linux swap / Solaris
/dev/sde3       234883072  1953519615   859318272    7  HPFS/NTFS/exFAT

Last edited by brambi (2012-01-29 15:19:12)

Offline

#10 2012-01-29 15:31:13

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Grub error

This is how GRUB would work with your UUID:

linux	/boot/vmlinuz-linux root=UUID=e3b04d69-7f5b-4f27-a60b-87b859ec764c ro nomodeset quiet

Ignore the stanza itself, just copy the root= stuff. This is how my GRUB2 looks like but legacy GRUB uses the same syntax for UUID.

You should switch your fstab to UUIDs as well:

$ cat /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system>                                 <dir>                   <type>  <options>                       <dump>  <pass>
tmpfs                                           /tmp                    tmpfs   nodev,nosuid                    0       0

UUID=a84bb96a-abcd-uvwx-a03b-08e60b1d46f3       /                       ext4    defaults,noatime                0       1
UUID=55b2001c-efgh-qrst-a8ae-524985f51c42       /home                   ext4    defaults,noatime                0       1
UUID=ee187b17-ijkl-mnop-ac96-6a77e0c17e77       /var/data/video/films   ext4    defaults,noatime,nouser_xattr   0       2
UUID=cbc6f6d7-blaa-blaa-bd66-b674ab12bd66       /var/data/video/series  ext4    defaults,noatime,nouser_xattr   0       2

That way you don't have to wonder about device nodes getting swapped. Ever.

Last edited by .:B:. (2012-01-29 15:31:48)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#11 2012-01-29 16:05:00

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED]Grub error

Your first menu.lst shows arch trying to boot hd3 and the second menu.lst arch trying to boot hd4.  Not sure what you got going there.  The numbering system changed from grub1 to grub2.  See following.  You are most likely using grub1.

Regarding separate hard drives, I believe the identification system is: sda, sdb, sdc, sde, sdf, etc.

GRUB1

Note: GRUB defines storage devices differently than conventional kernel naming does.
Hard disks are defined as (hdX); this also refers to any USB storage devices.
Device and partitioning numbering begin at zero. For example, the first hard disk recognized in the BIOS will be defined as (hd0). The second device will be called (hd1). This also applies to partitions. So, the second partition on the first hard disk will be defined as (hd0,1).

GRUB2

Device naming has changed between GRUB and GRUB2. Partitions are numbered from 1 instead of 0 while drives are still numbered from 0, and prefixed with partition-table type. For example, /dev/sda1 would be referred to as
(hd0,msdos1)
(for MBR) or (hd0,gpt1) (for GPT) using GRUB2.

Offline

#12 2012-01-29 17:04:37

brambi
Member
Registered: 2012-01-29
Posts: 17

Re: [SOLVED]Grub error

Thanks for your replies,

I changed the menu.lst with the correct UUID syntax, but I still get the same error. I have no idea what I'm doing wrong here, everything seems to be fine, I can mount the ext4 filesystem with my archlinux live usb(so i'm guessing it isn't corrupted or anything), the menu.lst is correct(as far as i know)  and the id is correct(83).

David, well because I first thought it was sdd, no idea why, so I set it as hd(3,0), but now that I'm sure it's sde I put it back as hd(4,0).

Also, I still have grub2 from a previous ubuntu installation on the first hard disk, or doesn't that matter? Now I'm just manually selecting the harddisk where archlinux is at boot , and from there I'm getting in grub1.

Offline

#13 2012-01-29 18:02:00

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED]Grub error

Generally speaking, when you install a new linux distro, it will install GRUB to the MBR and that becomes your new GRUB.  If you are booting GRUB2, then you don't even use menu.lst.  The configuration is all different.  You can mix and match GRUB1 and GRUB2, but you need to edit and configure each one differently - it really depends on which GRUB is booting or booting first if you chain load.

You can install a linux distro and have it write GRUB to the / root partition of the OS you are installing.  This way it does not overwrite your existing GRUB from another distro - if you have one installed.  To do this, you have to choose the right option from the menu when installing GRUB.

Whichever hard drive is first seen by the computer will be the one that boots up - if you have more than one bootable drive installed.  If GRUB2 is on the first hard drive, that is what will boot.  It is possible to select a different hard drive to boot from a BIOS boot menu if your BIOS offers that option.  My Lenovo ThinkPad has that option by pressing F12 at the Lenovo splash screen.

Offline

#14 2012-01-30 06:14:02

brambi
Member
Registered: 2012-01-29
Posts: 17

Re: [SOLVED]Grub error

Thanks for your reply,

I installed grub1 on the sde, and I'm using bios boot selection to select the correct hard disk, so there should be no problem in that case right?


EDIT: I reinstalled it and now it works. But this is crazy, when installing it was sdd again, and I didn't do anything different other then writing grub to sda now instead of the drive itself. And when booting it's sdd as well. Arch sorcery I guess.

Thanks for all your help!

Last edited by brambi (2012-02-01 12:02:51)

Offline

Board footer

Powered by FluxBB