From: Harald W. <hwe...@gm...> - 2008-05-17 23:46:47
|
Hello, How can logical hard disk partitions be accessed within a colinux environment? The hard disk partition is like: Disk /dev/hda: 400.0 GB, 400088457216 bytes 255 heads, 63 sectors/track, 48641 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 5099 40957686 7 HPFS/NTFS /dev/hda2 5100 20397 122881185 7 HPFS/NTFS /dev/hda3 20398 21856 11719417+ 83 Linux /dev/hda4 21857 48641 215150512+ 5 Extended /dev/hda5 21857 28543 53713296 8e Linux LVM /dev/hda6 28544 35230 53713296 8e Linux LVM /dev/hda7 35231 41917 53713296 8e Linux LVM /dev/hda8 41918 48641 54010498+ 8e Linux LVM hda1 and hda2 are Windows XP Home C: and D: . hda3 is the root partition of a Linux installation (Debian 4.0). hda5 contains an LV group with LVs for swap and /home. I use the coLinux Snapshot 20080425 with the kernel and modules version 2.6.22.18-co-0.8.0 as provided by Henry Nestler. The basic configuration is not special: mem=256 kernel=vmlinux root=/dev/cobd0 ro cobd0=d:\coLinux\system.img eth0=pcap-bridge,"LAN-Verbindung" system.img contains a minimal Debian 4.0 installation. When trying to access the linux partitions under colinux like: cobd1=\Device\Harddisk0\Partition3 cobd2=\Device\Harddisk0\Partition4 cobd3=\Device\Harddisk0\Partition5 cobd4=\Device\Harddisk0\Partition6 cobd5=\Device\Harddisk0\Partition7 only the primary partition 3 (cobd1) is effectively visible under coLinux. The logical partitions cannot be accessed: colinux:~# cat /dev/cobd2 cat: /dev/cobd2: No such device colinux:~# ls -l /dev/cobd2 brw-rw---- 1 root disk 117, 2 May 18 01:13 /dev/cobd2 According to the output of "dd --list" under Windows, [see http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm ] the partitions should well exist: [...] \\?\Device\Harddisk0\Partition0 link to \\?\Device\Harddisk0\DR0 Fixed hard disk media. Block size = 512 size is 400088457216 bytes \\?\Device\Harddisk0\Partition1 link to \\?\Device\HarddiskVolume1 \\?\Device\Harddisk0\Partition2 link to \\?\Device\HarddiskVolume2 \\?\Device\Harddisk0\Partition3 link to \\?\Device\HarddiskVolume3 Fixed hard disk media. Block size = 512 size is 12000683520 bytes \\?\Device\Harddisk0\Partition4 link to \\?\Device\HarddiskVolume4 size is 55002415104 bytes \\?\Device\Harddisk0\Partition5 link to \\?\Device\HarddiskVolume5 size is 55002415104 bytes \\?\Device\Harddisk0\Partition6 link to \\?\Device\HarddiskVolume6 size is 55002415104 bytes \\?\Device\Harddisk0\Partition7 link to \\?\Device\HarddiskVolume7 size is 55306750464 bytes [...] Is there a way to access the partitions under coLinux? I also tried to access the whole hard disk under coLinux: cobd1=\Device\Harddisk0\Partition0 alias hda=:cobd1 The entire hard disk seems to be visible under coLinux now. fdisk -l , or partprobe -d -s work fine: colinux:~# partprobe -d -s /dev/hda: msdos partitions 1 2 3 4 <5 6 7 8> /dev/cobd1: msdos partitions 1 2 3 4 <5 6 7 8> However, the partitions themselves are not present. Even partprobe is not able to communicate the partitions to the kernel: debian:~# partprobe -s Error: Error informing the kernel about modifications to partition /dev/hda1 -- Invalid argument. This means Linux won't know about any changes you made to /dev/hda1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. Error: Error informing the kernel about modifications to partition /dev/hda2 -- Invalid argument. This means Linux won't know about any changes you made to /dev/hda2 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. [...] Finally, I'd like to try to access the locical partitions via the losetup command with --offset option. But the loop module is not present within the kernel/modules provided by Henry. Is there a reason why loop is ommitted? Would it be possible to access the locical partitions using loop with offset? Regards, Harald |