View Single Post
  #16  
Old 19th March 2006, 10:55
markes markes is offline
Junior Member
 
Join Date: Mar 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The warnings: "grep: command not found" is produced by this Code in line 1971 from mkinitrd:
cat_linuxrc <<-EOF
|# Workaround: dmraid should not probe cdroms, but it does.
|# We'll remove all cdrom device nodes till dmraid does this check by itself.
|for y in hda hdb hdc hdd hde hdf hdg hdh sr0 sr1 sr2 sr3;
|do
| if (grep -q "$y" /proc/sys/dev/cdrom/info)
| then
| rm -f /dev/"$y"
| fi
|done
|# Now we can load dmraid
|dmraid -ay -i
EOF

Solution:
Find out on wich port your cdrom drive hangs and delete all the other registers. In my case my cdrom hangs on Secondary Port as Master and so "hdc". So i deletetd all except hdc (|for y in hdc and save the file. After that you have to type mkinitrd in console as root.

The warnings
...
Mar 19 08:58:44 linux kernel: attempt to access beyond end of device
Mar 19 08:58:44 linux kernel: sda: rw=0, want=312581850, limit=312581808
Mar 19 08:58:44 linux kernel: Buffer I/O error on device dm-0, logical block 312581804
Mar 19 08:58:44 linux kernel: attempt to access beyond end of device
Mar 19 08:58:44 linux kernel: sda: rw=0, want=312581852, limit=312581808
Mar 19 08:58:44 linux kernel: Buffer I/O error on device dm-0, logical block 312581805
Mar 19 08:58:44 linux kernel: attempt to access beyond end of device
Mar 19 08:58:44 linux kernel: sda: rw=0, want=312581854, limit=312581808
Mar 19 08:58:44 linux kernel: Buffer I/O error on device dm-0, logical block 312581806
etc

are produced from your linux kernel. You have to fix your kernel if these warnings will be awkward for you:

Code:
diff -Nur linux-2.6.15/fs/partitions/check.c linux-2.6.15-check/fs/partitions/check.c
--- linux-2.6.15/fs/partitions/check.c	2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.15-check/fs/partitions/check.c	2006-02-08 21:20:03.000000000 +0100
@@ -175,8 +175,19 @@
 		memset(&state->parts, 0, sizeof(state->parts));
 		res = check_part[i++](state, bdev);
 	}
-	if (res > 0)
+	if (res > 0) {
+		sector_t from, cap;
+		for(i = 1; i < state->limit; i++) {
+			from = state->parts[i].from;
+			cap = get_capacity(hd);
+			if(state->parts[i].size + from > cap) {
+				printk(KERN_WARNING " %s: partition %s%d beyond device capacity\n",
+						hd->disk_name, hd->disk_name, i);
+				state->parts[i].size = cap - (from < cap ? from : cap);
+			}
+		}
 		return state;
+	}
 	if (!res)
 		printk(" unknown partition table\n");
 	else if (warn_no_part)
Look at http://tienstra4.flatnet.tudelft.nl/~gerte/gen2dmraid/ and https://www.redhat.com/archives/atar.../msg00015.html for further information. On http://tienstra4.flatnet.tudelft.nl/...dmraid-2.0.iso you can also download the Gentoo based LiveCD with dmraid-1.0.0-rc9. So you can use Gentoo directly without installing dmraid.

greets
markes

Last edited by markes; 19th March 2006 at 11:08.
Reply With Quote