Derek Jewett wrote:> Hello, new to the group. We have been using PXELINUX for some time now
with
> great success. However, with the recent spawn of virtual machines now
> supporting PXE boot, has anyone been able to mount the disk in this
> enviornment? Could someone direct me to any information on how to mount and
> or partition drives? I have discovered the same issue with the HP DX2200
> model of PC. For example if I run fdisk -l it reports nothing, any advise
> would be a great help, as my linux troubleshooting is lacking in this area.
> And we would like to explore disk imaging VM's. Thanks!
>
> Derek
>
Speaking of QEMU, I personnaly use some simple disk images made with dd.
dd if=/dev/zero of=hda.img bs=1M count=10000
Once the system is installed on my disk image I mount it using this
simple script.
This try to find the offset needed to mount the right partition.
It works fine for me with for windows & linux.
Hope this helps,
#!/bin/sh
LC_ALL=C
if [ "$#" -ne "3" ]; then
echo "Usage: `basename $0` <image_filename> <partition #
(1,2,...)>
<mount point>" >&2
exit 1
fi
if ! fdisk -v > /dev/null 2>&1; then
echo "Can't find the fdisk util. Are you root?" >&2
exit 1
fi
FILE=$1
PART=$2
DEST=$3
UNITS=`fdisk -lu $FILE 2>/dev/null | grep $FILE$PART | tr -s ' ' |
cut
-f3 -d' '`
OFFSET=`expr 512 '*' $UNITS`
mount -o loop,offset=$OFFSET $FILE $DEST