Mounting Xen DomU disk images in Dom0 using lomount
This document (3756370) is provided subject to the disclaimer at the end of this document.
Environment
openSUSE 10.3
Situation
Resolution
- You do not need network access
- You do not need to access particular devices, rather you need to access the file system
- You are trying to fix boot problems
-
A chrooted environment is sufficient
-
The disk or file system to be manipulated does NOT use LVM
-
You are not trying to repair an underlying filesystem
setup: discovering partitions, mounting and chrooting
- Navigate to the directory where the disk image can be found.
- Determine what loopbacks are currently being used
-
To determine all the loops typels /dev/loop*
-
Determine which loops have been assignedlosetup -a
-
Pick a loop device which has not been assigned
- Open the disk image using loopback devices; replace values as appropriate
losetup /dev/loop5 disk0
- Determine what the partitions are
fdisk -l /dev/loop5
-
- Mount partitions that are NOT type 82 (swap) or type 8e (Linux LVM).
-
The syntax is: lomount [-verbose] [OPTIONS] -diskimage FILE -partition NUM [OPTIONS]lomount -t reiserfs -diskimage disk0 -partition 3 /mnt
-
Check /mnt or the mount point. If it does not look like the root file system, unmount the file system and try again until you find the root file system.
-
- Repeat step 5 for each files system. Mount the file systems under their normal mount point, but under /mnt. For example, /var for the DomU should be mount to /mnt/var.
- If the system that you are accessing is the same architecture, you may chroot to the system.
chroot /mnt
cleanup: umounting and removing the loopback device
- Unmount the mounted partitions
umount
- Remove the loop device setup
losetup -d /dev/loopX
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:3756370
- Creation Date: 14-Feb-2008
- Modified Date:14-Dec-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com