You are not logged in.

#1 2012-02-16 20:44:54

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

First boot fails - Filesystem type unknown, partition type 0x7

Just done a straight forward install of Arch onto it's own disk drive, however there are two other drives present in the system.

Grub menu comes up ok but then Arch errors with:
root (hd2,0)
Filesystem type unknown, partition type 0x7
Error 17: Cannot mount selected partition

Any suggestions?

Thanks,

Offline

#2 2012-02-16 20:59:22

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: First boot fails - Filesystem type unknown, partition type 0x7

0x7 is NTFS partition type.

Last edited by alphaniner (2012-02-16 21:00:08)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2012-02-16 21:43:10

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: First boot fails - Filesystem type unknown, partition type 0x7

Do you know what HDD/partition you have your /root installed on?

Offline

#4 2012-02-17 10:38:50

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: First boot fails - Filesystem type unknown, partition type 0x7

GRUB Legacy (v0.97) starts counting from hd0,0.

Run a "Live" Linux distribution from a CD/DVD or a USB stick and run:

fdisk -l

sda1 is "hd0,0"
sda2 is "hd0,1"

...and so on.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-02-17 11:51:01

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

Hspasta wrote:

Do you know what HDD/partition you have your /root installed on?

Full drive layout from GParted on Knoppix boot CD:

/dev/sda1 - ntfs
/dev/sda2 - ntfs
/dev/sda3 - extended
/dev/sda5 - ntfs
/dev/sda6 - ntfs
/dev/sda7 - ntfs

/dev/sdb1 - ntfs
/dev/sdb2 - extended
/dev/sdb5 - ext3, boot, Debian
/dev/sdb6 - linux-swap, Debian
/dev/sdb7 - root, Debian

/dev/sdc1 - ext2, boot, Arch
/dev/sdc2 - linux-swap, Arch
/dev/sdc3 - ext4, root, Arch
/dev/sdc3 - ext4, /home, Arch

The Arch install was done allowing Arch to partition the whole drive and going with its chosen defaults.

Offline

#6 2012-02-17 13:18:46

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: First boot fails - Filesystem type unknown, partition type 0x7

Have you thought about using UUIDs instead? Because in a multi-drive, multi-partition setup like yours things can get confusing.


Edit: Here's how you find out the UUID of a partition:

ls -l /dev/disk/by-uuid/

This is more accurate because it outputs exactly what the Linux kernel sees. But the following command may also work (I had mixed results with this one... sometimes it saw the previous UUID and/or label):

blkid

Try something like this:

title	Arch Linux
root	(hd0,0)
kernel	/boot/vmlinuz-linux root=UUID=a8aa4adb-b3e6-4e1d-b4ad-e6cd704788b2 ro quiet
initrd	/boot/initramfs-linux.img

Add the "(hd0,0)" part but ignore it for now. The UUID should point it in the right direction. If that doesn't work:

title	Arch Linux
root	(hd0,0)
kernel	/boot/vmlinuz-linux root=/dev/disk/by-uuid/a8aa4adb-b3e6-4e1d-b4ad-e6cd704788b2 ro quiet
initrd	/boot/initramfs-linux.img

Last edited by DSpider (2012-02-17 13:47:39)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-02-17 20:08:32

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

Actual text from menu.lst

# (0) Arch Linux
title  Arch Linux
root   (hd2,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/11b10499-6f03-4b6f-a244-9169a9186135 ro
initrd /initramfs-linux.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd2,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/11b10499-6f03-4b6f-a244-9169a9186135 ro
initrd /initramfs-linux-fallback.img

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

Ths uuid refered to is correct in that it is the uuid of sdc3, the Arch root.

However what I look in there I cannot see any /vmlinuz-linux file, should  be able to or is it hidden from me?  I have also looked in /boot and it is not there either.

Just noticed that file does exist but on sdc1, the Arch boot not the root.  Is this correct?  So if I can find a way to change the uuid to that of sdc1 will that work, having problems saving menu.lst at the moment due to permissions.

Now changed the uuid to point towards the sdc1 partition Arch /boot, but same problem: partition type 0x7.  How can I possibly still be getting this error when there are no NTFS partitions on disk sdc?  Unless grub is somehow looking at the disks in a different order.

Last edited by NickC_UK (2012-02-17 20:20:50)

Offline

#8 2012-02-17 20:19:44

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: First boot fails - Filesystem type unknown, partition type 0x7

Because you have a separate /boot partition you need to point it at

/dev/sdc1 - ext2, boot, Arch


AFAIK, Knoppix runs as root (as does Parted Magic). There shouldn't be any permission problems editing your menu.lst file.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-02-17 20:41:46

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

DSpider wrote:

Because you have a separate /boot partition you need to point it at

/dev/sdc1 - ext2, boot, Arch


AFAIK, Knoppix runs as root (as does Parted Magic). There shouldn't be any permission problems editing your menu.lst file.

I have now been able to edit menu.lst from a terminal window and done as you suggested.  Looks like I needed to use not only the uuid of /dev/sdc1 but also (hd0,0) rather than hd(2,0).  How can this be does Grub look at drive order differently to Linux?  Thats is that now boots.

Well not completely but error has now changed:
mount: mounting /dev/disk/by-uuid/5d17nnnetc on /new_root failed: no such device

Offline

#10 2012-02-17 21:49:16

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: First boot fails - Filesystem type unknown, partition type 0x7

"/dev/disk/by-uuid/5d17nnnetc" can't be the right UUID.

Even for NTFS partitions it's longer than that... Of course there's no such device. Check it again.

# blkid
# ls -l /dev/disk/by-uuid/

/dev/sdc1 - ext2, boot, Arch
/dev/sdc3 - ext4, root, Arch

The UUID from one of these should be the right one. I'm betting it's sdc3.

Last edited by DSpider (2012-02-17 22:09:50)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#11 2012-02-18 12:46:09

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

Sorry, by /dev/disk/by-uuid/5d17nnnetc I meant /dev/disk/by-uuid/5d17...etc. rather than type the entire uuid in.  I was replying to the message on a different machine so too lazy to type the full 32 character number.

Yep, I tried pointing it at sdc3 but that ones didn't have a /vmlinuz-linux file on it, sdc1 had the /vmlinuz-linux file so I changed the uuid to that.  This sort of worked, well the error changed.  Wasting time here so as Arch is a quick and clean install decided to wipe and install again.  Exacly the same problem encountered again.

I conclude that Grub just doesn't work properly in a multi disk environment, at least not in my multi disk environment.

Disconnected the two windows disks so that I have only the one (Arch) drive in the machine and re-doing the install again.  This time installs fine, no errors.

Only problem is once I put the other disk drives back in will it stop working again, menu.lst currently looks something like:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/d2321794-88d4-4c18-b34b-6ac78e4466ad ro
initrd /initramfs-linux.img

Now how do I connect up the other drives again, make this say the third drive in the system, and multiboot by changing the BIOS boot order of the disks.  Do I simply change to:
root (hd2,0)?

Offline

#12 2012-02-18 14:14:16

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: First boot fails - Filesystem type unknown, partition type 0x7

How do you boot in the first place - i.e. where is grub's first stage installed? How do you boot debian?
Switching drives in the Bios can mess up how grub counts the drives. Once you are in the grub menu you want, you can check how it sees your partition from the grub command line, e.g. find /vmlinuz-linux and find /bin/bash.

Offline

#13 2012-02-18 17:07:31

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: First boot fails - Filesystem type unknown, partition type 0x7

Admit it. You DID NOT try the sdc3 partition's UUID. You just assumed that since there's no "vmlinuz-linux" file on it, it won't work.

Because the way I see it:

1. MBR says to check the menu.lst
2. menu.lst says that from this partition ("root   (hd0,0)") use the "/vmlinuz-linux" package with "root=/dev/disk/by-uuid/the_arch_root_partition_uuid".


I suggested using UUID's because they're much more accurate than using labels or "sd[x][y]", because if you add a new drive or remove one, it completely fucks up the order, while UUID's are much more specific.

Last edited by DSpider (2012-02-18 17:08:09)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#14 2012-02-19 18:06:28

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

hokasch wrote:

...
Switching drives in the Bios can mess up how grub counts the drives...

Yes I think that is the root cause of the problem, grub just can't cope with drives changing in a multi-disk environment, I have lots of drives in caddies which we insert/remove depending on what I need to be doing at the time.

Coming from the windows world where for years we have just relied on changing the boot order of drives in the BIOS to choose which MBR to boot from I simply assumed it was just as easy in the Linux world, this is obviously not the case.

Thanks for your help.

Offline

#15 2012-02-19 18:10:52

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: First boot fails - Filesystem type unknown, partition type 0x7

For multiple disks, its better to go with grub2-bios, especially for cases where "Switching drives in the Bios can mess up how grub counts the drives". It includes search and setting root based on FS UUID/LABEL or file.

Offline

#16 2012-02-19 18:11:10

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

DSpider wrote:

Admit it. You DID NOT try the sdc3 partition's UUID. You just assumed that since there's no "vmlinuz-linux" file on it, it won't work.

Because the way I see it:

1. MBR says to check the menu.lst
2. menu.lst says that from this partition ("root   (hd0,0)") use the "/vmlinuz-linux" package with "root=/dev/disk/by-uuid/the_arch_root_partition_uuid".


I suggested using UUID's because they're much more accurate than using labels or "sd[x][y]", because if you add a new drive or remove one, it completely fucks up the order, while UUID's are much more specific.

The UUID of sdc3 was the one that Arch had put in there in the first place but for unknown reasons was causiong the error:
Filesystem type unknown, partition type 0x7

Offline

#17 2012-02-20 17:04:01

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

the.ridikulus.rat wrote:

For multiple disks, its better to go with grub2-bios, especially for cases where "Switching drives in the Bios can mess up how grub counts the drives". It includes search and setting root based on FS UUID/LABEL or file.

Just done another completely clean install and noticed that even though I select 'Partition access method - uuid' it doesn't seem to actually work that way, at least checking menu.lst showed no signs of any uuids.  What is the point of having an install option if it is then ignored.

Now going with your suggestion of grub 2, guess I just install it like: pacman -S grub2, then the optional pacman -S os-prober.

Ah bugger, rebooted and that just drops me into a grub command line, I had hoped that it would have at least taken the grub default menu.lst as a starting point.  This is rather annoying as, one fix after another after another, I had finally got KVM virtual machine manager working.  Alas not for long.

Any suggestion what I can do from here.  I can still boot the Arch CD.

Just trying booting from supergrub2 boot CD, it can see and boot the win2008 partition but not the Arch Linux partition.  These are all unrecognised fs.

Last edited by NickC_UK (2012-02-20 17:18:52)

Offline

#18 2012-02-20 17:14:07

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: First boot fails - Filesystem type unknown, partition type 0x7

Come on is it so hard.

pacman -S grub2-bios os-prober
grub_bios-install <arguments> <device>
GRUB_PREFIX="/boot/grub" grub-mkconfig -o /boot/grub/grub.cfg    -----> if you don't use a custom grub.cfg or
cp <your grub.cfg> /boot/grub/grub.cfg  -----> if you use a custom grub.cfg like me

Without grub.cfg you will be dropped into grub2 shell. menu.lst will not be used by grub2. https://wiki.archlinux.org/index.php/GR … onfig_file

Last edited by the.ridikulus.rat (2012-02-20 17:15:36)

Offline

#19 2012-02-20 17:28:21

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

Can I boot from the Arch Linux disk and somehow run the installed Arch on the hard drive from there?

Offline

#20 2012-02-20 17:46:24

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: First boot fails - Filesystem type unknown, partition type 0x7

Yes, you can chroot. But you'd be stuck using the 6 month-old kernel (3.0.3) used in 2011.08.19.


GRUB 2 is more complex. I suggest sticking to GRUB Legacy for now, with it's one and only menu.lst file, instead of GRUB 2's MANY files from /etc/grub.d. If you followed the Begginer's Guide everything should go rather smoothly.

https://wiki.archlinux.org/index.php/Be … bootloader

"The provided GRUB configuration (/boot/grub/menu.lst) should be sufficient, but verify its contents to ensure accuracy (specifically, ensure that the root (/) partition is specified by UUID on line 3)."


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#21 2012-02-20 17:49:34

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: First boot fails - Filesystem type unknown, partition type 0x7

DSpider wrote:

GRUB 2 is more complex. I suggest sticking to GRUB Legacy for now, with it's one and only menu.lst file, instead of GRUB 2's MANY files from /etc/grub.d. If you followed the Begginer's Guide everything should go rather smoothly.

Using the "grub2 many files in /etc/grub.d" is the user's choice. No one is compelling the user to use grub-mkconfig. Grub2 is technically more advanced and grub-legacy and the latter has rwached its end of life. For changing disks dynamically, search using uuid is better and that is supported only by grub2 (no need to hardcode root= like stuff).

EDIT: If you want simplicity go for syslinux. grub-legacy does not support use-cases like "Switching drives in the Bios can mess up how grub counts the drives" . Only grub2 supports that.

Last edited by the.ridikulus.rat (2012-02-20 17:51:32)

Offline

#22 2012-02-20 18:01:27

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

My Arch Linux is back!!

Booted from Knoppix CD and copied menu.lst.pacman back to menu.lst, now I have a working Arch Linux install again.  Now all I need to do is figure out how to get uuid partition identification working in grub/grub2 whatever I happen to be using at the moment.

Offline

#23 2012-02-20 18:43:15

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

Tried booting using uuid by adding a section to menu.lst:

# (3) Arch Linux uuid
title Arch Linux uuid
root (hd0,1)
kernel /vmlinuz-linux root=dev/disk/by-uuid/81165ee6-65a7-4b22-8d77-2c2752cac123 ro
initrd  /initramfs-linux.img

That works fine, linux boots ok using that uuid.  Now just going to add another disk drive...

Would be nice if the Arch installer could be trained to do this by uuid in the first place or at least do it when the by-uuid option is selected.  I guess the fact that the installer doesn't use uuid even when the uuid option is selected is a bug in the installer.

Again thanks for all your help.

Offline

#24 2012-02-21 12:31:46

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: First boot fails - Filesystem type unknown, partition type 0x7

What you still did not really tell us - how are you booting up? I.e. where is your first grub stage installed? How did you manage things with the debian install? Your problem is the root(x,x) line, not the kernel line. This line specifies the boot partition (grub's root/ where to find the kernel).

Coming from the windows world where for years we have just relied on changing the boot order of drives in the BIOS to choose which MBR to boot from I simply assumed it was just as easy in the Linux world, this is obviously not the case.

If you want to continue that way, just install grub to the MBR of each disk with a linux install and configure grub to use that drive as the first drive (e.g. set the root line to hd(0,0) if /boot is the first partition). IIRC, changing the boot order in the Bios will pull the selected drive to the beginning. That would fit your inital error (but you did not say how you booted into grub then...). You can double-check that behaviour by using the find commands in the grub shell (see my earlier post).

Going with grub2/grub's root by uuid only really makes sense if you put grub2 on the MBR of a drive which is always installed and selected as primary in Bios (obviously, all other grub2 files must be on that drive too).

Just done another completely clean install and noticed that even though I select 'Partition access method - uuid' it doesn't seem to actually work that way, at least checking menu.lst showed no signs of any uuids.  What is the point of having an install option if it is then ignored.

This refers to your fstab, not the bootloader config.

Last edited by hokasch (2012-02-21 12:32:51)

Offline

#25 2012-02-21 13:20:57

NickC_UK
Member
Registered: 2012-02-16
Posts: 27

Re: First boot fails - Filesystem type unknown, partition type 0x7

hokasch wrote:

What you still did not really tell us - how are you booting up? I.e. where is your first grub stage installed? How did you manage things with the debian install? Your problem is the root(x,x) line, not the kernel line. This line specifies the boot partition (grub's root/ where to find the kernel).

Coming from the windows world where for years we have just relied on changing the boot order of drives in the BIOS to choose which MBR to boot from I simply assumed it was just as easy in the Linux world, this is obviously not the case.

If you want to continue that way, just install grub to the MBR of each disk with a linux install and configure grub to use that drive as the first drive (e.g. set the root line to hd(0,0) if /boot is the first partition). IIRC, changing the boot order in the Bios will pull the selected drive to the beginning. That would fit your inital error (but you did not say how you booted into grub then...). You can double-check that behaviour by using the find commands in the grub shell (see my earlier post).

Going with grub2/grub's root by uuid only really makes sense if you put grub2 on the MBR of a drive which is always installed and selected as primary in Bios (obviously, all other grub2 files must be on that drive too).

Just done another completely clean install and noticed that even though I select 'Partition access method - uuid' it doesn't seem to actually work that way, at least checking menu.lst showed no signs of any uuids.  What is the point of having an install option if it is then ignored.

This refers to your fstab, not the bootloader config.

Sorry hokasch, it got a bit difficult to answer your earlier post as by the time I read it Debian had been trashed and I think I had redone the Arch install a few times by then as well.

If I have understand you correctly what you are saying is that if I were to install arch on a drive which at install time is the only drive in the machine then root(x,x) would refer to hd0 in my case root (hd0,1) as I have an NTFS partition at the beginning of the drive.  Alternatively I could just edit grub's menu.lst afterwards.  That way as long as the drive is first in the BIOS boot order it will boot ok.  My mistake seems to have been trying to install the first grub stage to somewhere other than the MBR, I may have missunderstood the capabilities of partition identification by uuid.

Ok lets go back to a single drive environment

hd0,0 = NTFS boot partition
hd0,1 = Arch /Boot - this contains grub & vmlinuz-linux
hd0,2 = Arch swap
hd0,3 = Arch /

If I want to boot Windows I set hd0,0 as active/bootable, if I want to boot arch I set hd0,1 as active/bootable.  Actually not sure how to change the active partition to a linux one but come back to that later.  For the moment hd0,1 is the bootable partition.  This is the only drive in the system.  I have a by-uuid entry in menu.lst which allows me to boot if the other entries fail.  menu.lst looks like this:

# (0) Arch Linux
title  Arch Linux
root   (hd0,1)
kernel /vmlinuz-linux root=/dev/sda4 ro
initrd /initramfs-linux.img

Now I see part of the confusion, as you advised, the root (hdx,x) line actually refers to the 'grub root' / 'linux boot' not the 'linux root'.  And the other confusion is that the kernel line root= does not refer to the location of /vmlinuz-linux but to the actual linux root.  Now I think I understand that bit.

Now to add another disk to the system.  Change drive order in BIOS so that arch disk is top of the boot order.

Fails to boot: Unable to find root device /dev/sda4!

Boot to knoppix to see the disk & partition layout:

hd0,0 = NTFS
hd0,1 = NTFS
hd0,2 = NTFS
hd0,3 = NTFS
hd0,4 = NTFS
hd0,4 = NTFS
hd0,4 = NTFS

hd1,0 = NTFS boot partition
hd1,1 = Arch /Boot - this contains grub & vmlinuz-linux
hd1,2 = Arch swap
hd1,3 = Arch /

So clearly /dev/sda4 is now an NTFS partition.

If appears that grub & linux do not see disk drives in the same order as the BIOS boot order causing /dev/sda4 to point towards the wrong partition.

Off at a bit of a tangent here but while I think of it is there a way of regenerating the menu.lst to search for instances of windows on NTFS partitions now that I have access to ntfs-3g.

Thanks,

Last edited by NickC_UK (2012-02-21 14:25:04)

Offline

Board footer

Powered by FluxBB