You are not logged in.

#1 2005-03-19 19:44:02

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

An ext2 partition problem on install & multiple swap

I'm installing Arch on a second machine.  This one has 2 scsi drives.  I set up a /boot partition at /disc0/part1, had it formatted as ext2.  I put a swap partition on this drive.  This is marked bootable.  The rest of the partitions are reiserfs.

I installed grub into /disc0/disc, which I understand is the MBR.

When the machine reboots after installation, I get an error:

fsck.ext2:  No such file or directory while trying to open /dev/discs/disc0/part1
/dev/discs/disc0/part1:  The superblock could not be read or does not describe a correct ext2 filesystem.

It goes on to suggest running e2fsck.

Since I originally posted this I ran knoppix on the machine, checking with Qtparted shows that the partition is fine, all the files that should be there are there.

1.  What am I doing wrong?  I know I don't technically need a /boot partition, and if it comes to that, I'll do without, but don't understand  why that would be the problem.

2.  I've read that performance is better if you have a swap on each drive if more than one.        How do I create the second swap?  I've created a partition for it, but don't know how to mark it as swap.

Offline

#2 2005-03-19 21:50:49

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: An ext2 partition problem on install & multiple swap

Does the grub load at all after reboot? Do you get the boot menu or does it fail before?

Offline

#3 2005-03-19 22:12:50

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: An ext2 partition problem on install & multiple swap

I get a boot menu, it then proceeds through, finding drives, scrolling information; loads all the SCSI drivers, goes through several lines of reiserfs, then gives a FAIL when initiating the SWAP and then gives the messages on the ext2. 

I watched it format that ext2 partition when it was setting up.

The last lines of dmesg are

VFS: mounted root (reiserfs filesystem) read only
Freeing unsed kernel memory

Then the crash message

Offline

#4 2005-03-19 22:22:01

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: An ext2 partition problem on install & multiple swap

I think I may have found a udev bug.

I use udev on my other machines, and so mount my kernel devfs=nomount

On a whim, I deleted the "devfs=nomount" from the grub command line.

Bingo, my system comes up fine.  I'm not sure how to report what happened, but at this point I'm not going to get too excited about it; at least the system is up.

Offline

#5 2005-03-20 13:03:33

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: An ext2 partition problem on install & multiple swap

You don't have udev installed. iirc Arch does NOT install udev by default. As Arch Linux uses devfs-style disk and partition naming in dev, these won't be found if neither devfs nor udev is working.

There is an udev-howto page at the wiki that tells you how to get it going. The default Arch Linux udev configuration is set up to additionally create devfs-style hard disk and partition naming, you won't have to change your /etc/fstab.

Cheers,
Dominik

Offline

#6 2005-03-20 16:18:23

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: An ext2 partition problem on install & multiple swap

OK, then I'm really confused.  I have used the devfs=nomount on my other systems when I set them up (at least that's the way I remember it), and I seemed to be running udev.  I guess that's why I'm posting in this forum.  :oops:

Offline

#7 2005-03-20 18:40:15

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: An ext2 partition problem on install & multiple swap

Ok, let me elaborate:

From the error messages you get it seems that grub successfully boots the kernel but the kernel fails to find your filesystem/swap partitions. This can have several reasons but the non-existence of the appropriate device nodes in /dev seems to be the problem in your case.

In your /etc/fstab the filesystem and swap entries are probably configured using devfs-style names, because that is what the Arch installer does set up.

E.g. /dev/discs/disc0/part1 for /boot and
/dev/discs/disc0/part2 for /
etc. ymmv

Now the point is that these entries do NOT exist by default, devfs or udev have to create them, usually they are symlinks to traditional entries like /dev/hda1 or /dev/hda2 (or the other way round, in case of devfs).
Now, if you are using neither devfs nor udev you won't have the proper devfs-style device entries in your /dev directory and that's causing to kernel to hickup because he simply cannot find the discs you tell him to mount. Normally you configure grub/lilo to tell the kernel which partition he shall use as / (thats the root=/dev/whatever option for the kernel)

Therefore you MUST run either one of devfs or udev to see the proper device entries. If you are using neither then you will have to adapt your /etc/fstab and /boot/grub/menu.lst or the kernel won't be able to mount the filesystems nor be able to activate the swap partitions.

As Arch Linux 0.7 does NOT install udev by default you will either have to use devfs (this is done by NOT using the devfs=nomount option) or install udev (then you'll probably want to set the devfs=nomount option).

Cheers,
Dominik

Offline

#8 2005-03-20 20:47:22

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: An ext2 partition problem on install & multiple swap

timm wrote:

2.  I've read that performance is better if you have a swap on each drive if more than one.       
How do I create the second swap?  I've created a partition for it, but don't know how to mark it as swap.

mkswap /dev/hda6
swapon /dev/hda6

(/dev/hda6 is of course just an example)

This is just to mark the partition as swap and to make Linux use it as such. Once you've done this, you can add a line in your /etc/fstab about that partition (copy the other line about your swap and adapt it). This way it will be activated once "swapon -a" is run, usually during booting (Arch uses tmpfs by default as a swap device, I've changed this by commenting out the tmpfs line in /etc/fstab, adding the appropriate lines in there for the swap partitions and finally putting "swapon -a" in /etc/rc.local).

I'm probably not really clear in this post so if there's anything not clear, I'll be happy to elaborate. wink (also, I could be completely wrong but I think I'm not big_smile)

[edit]
Swap performance with swap partitions on different disks is better because Linux automatically stripes the partitions (like RAID 0).
[/edit]

PS.: I was sober when I wrote this. :oops:


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#9 2005-03-20 22:16:12

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: An ext2 partition problem on install & multiple swap

Aye, if you have more than one disk it can be useful to have swap partitions on each disk. However, that won't really give you a big performance boost unless you are running real memory eaters. For a normal desktop even with limited RAM you won't gain much.

Cheers,
Dominik

Offline

#10 2005-03-22 00:13:51

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: An ext2 partition problem on install & multiple swap

I went back and installed udev, per the instructions in the wiki.  I got the same problem I started out with.

The wiki says that if you can't get an initial console ( I don't get that error, but I checked anyway) to make missing static nodes

mknod -m 660 console c 5 1
mknod -m 660 null c 1 3

Now, I checked /dev and these items exist, like this

console crw-------- 1 root root 5,1
null        crw-rw-rw 1 root root 1,3

I'm not sure if this gives any info on the problem, or if I'm looking in the wrong place
altogether.

Like I said before, my box is up so this is just to figure out what's going on.

Offline

#11 2005-03-22 09:39:36

incinerator
Member
From: Edinburgh, Scotland
Registered: 2005-02-15
Posts: 80

Re: An ext2 partition problem on install & multiple swap

Check your /etc/fstab and convert the device entries for your hard disks to the traditional naming scheme, that works for me.

Offline

Board footer

Powered by FluxBB