The HyperTrap
Alexandre Chartre's Weblog
Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
Links
All | General | LDoms
« Split PCI with LDoms | Main | Devices and PCI... »
20070820 Monday August 20, 2007
Utility to easily use Linux disk images with LDoms
After my first look at Linux with LDoms, I did more investigations on what is wrong with the disk label from Linux images to run with LDoms. The problem is that the disk label created by Linux (GNU Parted Custom label) is not entirely correct: it does not defined the number of partitions (which should be 8) and it does not mark the disk vtoc as sane (a sane vtoc is identified with the value 0x600DDEEE). Hence the LDoms virtual disk server does not recognize this disk label as a valid Sun VTOC label.

So I did a small program (vdlinux) which corrects these invalid values. It just have to be run on a Linux disk image and then that disk image can be run with LDoms without having to do any fancy tricks (like changing the disk label before and after binding the domain). The utility also applies the workaround for bug 6544963 if this is needed.

# vdlinux bootlinux 
Incorrect number of partition (0).
Updating number of partition to 8.
Incorrect vtoc sanity (0).
Correcting vtoc sanity (600ddeee).
Applying workaround for bug 6544963.
Updating label checksum.
You only needs to run the program one time on your Linux disk image. So it is best to do it right after you have generated your disk image and unbind the domain. If you execute the program another time, it will just say that the label is correct:
# vdlinux bootlinux 
Label looks correct.
Then you can start your Linux domain as a regular domain without having to care about the label of the Linux disk image.

The vdlinux utility is available here:

The source file can be compiled with the following command:
cc -o vdlinux vdlinux.c

Aug 20 2007, 09:31:11 AM PDT Permalink

Comments:

Post a Comment:

Comments are closed for this entry.