Hi, everyone. I recently succeeded to create SUSE domU using YaST VM Management with an install server(others, no way). The domU''s root fs image has been created automatically in /var/lib/xen/images/vm1/hda. Wonderful. I tried to loopback mount in order to see what is in this image file. But I can''t. The error message is: mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or other error This image file, of course, works well as root fs. I''m very curious about this image file and want to open it. I would thank for any suggestion. -- Noniko Blogs: http://jroller.com/page/Noniko (Broken English) http://www.myblog.de/noniko (Schlechtes Deutsch) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Noniko. I fitted same thing. When I was verifying Xen on SLES10 Beta.> /var/lib/xen/images/vm1/hda. Wonderful.It is whole disk image.> I tried to loopback mount in order to see what is in this image file. > But I can''t. The error message is: > > mount: wrong fs type, bad option, bad superblock on /dev/loop0, > missing codepage or other errorThis error is correct. Because hda is not filesystem. Please try following step. 1. Mapping hda to /dev/loop0. # losetup /dev/loop0 /var/lib/xen/images/vm1/hda 2. Look at geometric information on /dev/loop0. # fdisk -l -u /dev/loop0 Disk /dev/hda: 30.7 GB, 30738677760 bytes 255 heads, 63 sectors/track, 3737 cylinders, total 60036480 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/loop0p1 63 208844 104391 83 Linux /dev/loop0p2 208845 60034904 29913030 83 Linux 3. Calculate the offset. offset = Start x Unit size # offset=((63*512)) 4. Mapping hda1 in /dev/loop0 # losetup -o $offset /dev/loop1 /dev/loop1 5. Mount /dev/loop1 to /mnt/vm1_hda1 # mkdir /mnt/vm1_hda1 # mount /dev/loop1 /mnt/vm1_hda1 That''s all. .::.:... .::....: .::...:: .::.:.:: .::..:.: .:::..:. TAIRA Hajime <htaira@fedora.jp> web: http://pantora.net/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Taira-san Thank you very much! How helpful! I followed your advice and did it! Here is my case: # losetup /dev/loop0 /var/lib/xen/images/vm1/hda # fdisk -l -u /dev/loop0 Disk /dev/loop0: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/loop0p1 63 1060289 530113+ 82 Linux swap / Solaris /dev/loop0p2 * 1060290 8385929 3662820 83 Linux # losetup -o $((1060290*512)) /dev/loop1 /dev/loop0 # mount /dev/loop1 /mnt/vm1_hda1 Now I can look into the image file! Wonderful!> It is whole disk image.Hmmmm....It must be a difference between a simple filesystem I have created myself and unavailable with YaST VM Management. Noniko _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sunday 04 June 2006 17:08, TAIRA Hajime wrote:> Hi, Noniko. > > I fitted same thing. When I was verifying Xen on SLES10 Beta. > > > /var/lib/xen/images/vm1/hda. Wonderful. > > It is whole disk image.A better way is to use the lomount command: e.g. lomount -diskimage /var/lib/xen/images/vm1/hda -partition 2 /mnt -- Roger Whittaker Primary Support Engineer rwhittaker@novell.com 01344 326116 07802 357081 Novell, Inc. Software for the Open Enterprise http://www.novell.com/open _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks, Roger!> A better way is to use the lomount command: > e.g. > > lomount -diskimage /var/lib/xen/images/vm1/hda -partition 2 /mntIt worked too! Wow, it''s a good way to learning about filesystem. I suggest for Xen''s user manual to write "Xen is very good for practicing Linux. If you like to learn Linux, start from Xen!" Noniko _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Roger. Thank you.> A better way is to use the lomount command: > e.g. > > lomount -diskimage /var/lib/xen/images/vm1/hda -partition 2 /mntI didn''t know it. It''s so easy. .::.:... .::....: .::...:: .::.:.:: .::..:.: .:::..:. TAIRA Hajime <htaira@fedora.jp> web: http://pantora.net/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users