Translations of this page:

Installing Debian Lenny onto a LDOM logical domain


In this wiki, we will detail all steps followed to create a LDOMs logical domain ready to run Debian Lenny, and then to install that operating system.

Disclaimer: This procedure includes some actions over partition tables in virtual hard drives, and any mistake can leave your virtual disk unusable. Please, follow the steps carefully ;-)

Logical domain creation

To create the logical domain, we will follow the standard procedure but, once created virtual disk and bound the domain, we should overwrite the partition table with 512 null bytes, since LDOMs version included in Opensolaris 2009.06 will overwrite partition tables with fake Sun VTOCs, and this will leave unusable the disk for Linux.

So, let's go with the configuration steps. Our test domain will have 1 Gb RAM, 1 CPU thread and 4 Gb disk:

global# ldm list-domain
primary          active     -n-cv-  SP      8     4G       0.2%  10m
global# ldm add-domain debiandom
global# ldm add-vcpu 1 debiandom
global# ldm add-memory 1024m debiandom
global# ldm add-vnet vnet1 primary-vsw0 debiandom
global# mkfile 4G /export/ldomsvdisks/debian01.img

Now, let's add virtual disk to the domain and bind it:

global# ldm add-vdsdev /export/ldomsvdisks/debian01.img vol2@primary-vds0
global# ldm add-vdisk vdisk1 vol2@primary-vds0 debiamdom
global# ldm bind debiandom

After binding, we should restore an empty partition table:

global# dd if=/dev/zero of=/export/ldomsvdisks/debian01.img conv=notrunc count=1

Last, we will change auto-boot variable to false, to avoid autoboots while installing it:

global# ldm set-variable auto-boot\?=false debiandom

So, our domain is ready to receive a Debian installation. Let's go with it.

Network installation

We cannot install Debian with a CDROM image, so we will do it with the most basic (and compatible) network installation: by using TFTP.

Installing the install server

We need to configure RARP and TFTP. Let's start with TFTP, serving the Debian Lenny for Sparc boot.img through the network:

global# mkdir /tftpboot ; cd /tftpboot

Now, we need an additional link in /tftpboot, dependent on assigned IP address to our client, in our case That is, the following commands:

global# cd /tftpboot
global# ln -sf boot.img `printf %02x 192 168 91 2|tr [:lower:] [:upper:]`
global# ls -l
lrwxrwxrwx   1 root     root          15 Sep 18 19:42 C0A85B02 -> boot.img

Now, we will configure the tftp service:

global# echo "tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot" > ~/tftp.inetd.conf
global# inetconv -i tftp.inetd.conf
global# svcs -a|grep tftp
online         19:05:45 svc:/network/tftp/udp6:default

And then, we will install and configure RARP:

global# pkg install SUNWbs

Now, we need to know the virtual MAC and save it to /etc/ethers:

global# ldm ls -l debiandom |grep vnet1
    vnet1            primary-vsw0@primary        network@0  00:14:4f:fb:02:4a        1                         1500 

So, let's save this MAC in /etc/ethers and put the IP address in /etc/hosts. Finally, we start the RARP service. In our example:

global# echo "00:14:4f:fb:02:4a debiandom" > /etc/ethers
global# echo "    debiandom" >> /etc/hosts
global# svcadm enable rarp

We should also to configure NAT in control domain, in order to permit our Debian to reach Internet and download packages. For example, we need to configure an IP address in virtual switch used for the LDOMs:

global# ifconfig vsw0 plumb ; ifconfig vsw0 netmask up

And we should add the following lines for NAT to /etc/ipf/ipnat.conf:

map e1000g0 -> 0/32 proxy port ftp ftp/tcp
map e1000g0 -> 0/32 portmap tcp/udp auto
map e1000g0 -> 0/32

Let's reload NAT tables:

global# ipnat -CF -f /etc/ipf/ipnat.conf

Starting installation

Now, it's time to start logical domain and connect us to its console, by using the commands:

global# ldm start debiandom ; telnet localhost 5000
Connecting to console "t2000-01" in group "t2000-01" ....
Press ~? for control options ..

~ ?
{0} ok boot net
Boot device: /virtual-devices@100/channel-devices@200/network@0  File and args: 
Requesting Internet Address for 0:14:4f:fb:2:4a

After booting net, we will see the boot messages for Linux. Now, we will start the Debian Lenny installation, with the following tips:

  • Manually select sunvnet network driver as soon as Debian ask us for it since Debian will not find it automatically.
  • Manually configure IP address and rest of network parameters, since we are not using DHCP. For example:
IP address:
Nameserver: x.x.x.x (put here your favourite DNS server)
Hostname: debian
  • Select the closest Debian mirror and then Debian installer will download some files. The installer will stop again since it will not see hard drives and we will need to select the disk driver from a list. Here, manually select sunvdc.
  • We should then to see the partition manager, detecting our disk. Now, partition the disk at your own style. We have tested a single big partition and separate for /home, and it worked in both cases.

The process will continue normally. We recommend to simplify it, so avoid any selection in tasksel step, and this will leave a base system installed and bootable, with network. In the last step, when the installer ask us about end process and reboot, do not confirm and go back, in order to launch a shell. Then go the next section.

Important steps before rebooting

We need to change some things after inst

en/debianontoldom.txt · Last modified: 2011/05/26 15:25 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki