WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] HVM Squeeze in domu without network

To: Sam <liste-xen@xxxxxxxxxxxx>
Subject: Re: [Xen-users] HVM Squeeze in domu without network
From: Andrew McGlashan <andrew.mcglashan@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Apr 2011 11:56:52 +1000
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 24 Apr 2011 19:02:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DACA451.3030402@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Affinity Vision Australia Pty Ltd
References: <4DACA451.3030402@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)
Hi Sam,

I think the problem is that the network driver you require is in non-free and no longer part of a standard Squeeze ISO file.

You can add in non-free firmware, see the attached scripts.

Here was my original source on this:

http://dannf.org/bloggf/tech/add-firmware-to.html


More info here too, with some unofficial images referenced:

http://www.debian.org/releases/stable/debian-installer/


Cheers

--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP

Current Land Line No: 03 9912 0504
Mobile: 04 2574 1827 Fax: 03 9012 2178

National No: 1300 85 3804

Affinity Vision Australia Pty Ltd
http://www.affinityvision.com.au
http://adsl2choice.net.au

In Case of Emergency --  http://www.affinityvision.com.au/ice.html
#!/bin/bash

#add-firmware-to.sh---orig-file---new-file---release

if [ ! -z "$1" ];
then
        ISO_FILE=$1
else
        COUNT=$(ls *iso 2>/dev/null|wc -l)
        echo "Number of ISO files found: $COUNT"
        if [ $COUNT -ne 1 ]; then echo "No ISO file specified, none or too many 
found!!!";exit; fi
        ISO_FILE=$(ls *iso)
fi

CUSTOM=$(basename $ISO_FILE .iso)-custom.iso
(
CMD="/mnt/squeeze.wrk/add-firmware-to.sh $ISO_FILE $CUSTOM squeeze"
eval  $CMD
) 2>&1 |tee mk-$CUSTOM.out
#!/bin/sh

#
# add-firmware-to: Add non-free firmware to Debian install media
#
# Copyright (C) 2008-2009 dann frazier <dannf@xxxxxxxxxx>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Changelog:
# 2011.02.08 - Add support for initrd.img files (same as initrd.gz)
#              (Andrew McGlashan)
# 2009.02.17 - Add support for isolinux-based CD images,
#              which should work for i386/amd64 - happy
#              to add other archs upon request
# 2008.??.?? - Initial creation, just works on initrds
#
 
set -e

is_iso() {
   file "$1" | grep -q "ISO 9660"
}

is_initrd() {
    file "$1" | grep -q "gzip compressed data"
}

fetch_firmware() {
    local target
    local fwfile
    local fwurl
    local suite

    target="$1"
    suite="$2"
    fwfile="firmware.tar.gz"
    
fwurl="http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/$suite/current/$fwfile";
    wget "$fwurl" -O "$target"
}

am_root() {
    [ "$(id -u)" -eq 0 ]
}

initrd_append_fw() {
    local initrd="$1"
    local fwfile="$2"
    local outfile="$3"

    local initrdtmp="$(mktemp -d)"
    gunzip < "$initrd" > "$initrdtmp/initrd"

    cd "$initrdtmp"

    tar xfz "$fwfile"
    mkdir x
    for file in *deb; do
        dpkg-deb -x "$file" x
    done

    (cd x && find . | cpio -H newc -o) >> initrd
    cd -
    gzip -9 < "$initrdtmp/initrd" > "$outfile"

    rm -rf "$initrdtmp"
}


if [ $# != 3 ]; then
  echo "Usage: add-firmware-to.sh <infile> <outfile> <suite>" >&2
  exit 1
fi

file="$1"
if [ ! -f "$file" ]; then
  echo "$file not found" >&2
  exit 2
fi

outfile="$2"
if [ -e "$outfile" ]; then
  echo "$outfile already exists" >&2
  exit 2
fi

suite="$3"
if [ "$suite" != "lenny" ] && [ "$suite" != "squeeze" ]; then
    echo "Unrecognized suite $suite, trying anyway." >&2
fi

fwfile="$(mktemp)"
if ! fetch_firmware "$fwfile" "$suite"; then
    echo "ERROR: Could not download firmware" >&2
    exit 1
fi

if is_iso "$file"; then
    isotmp="$(mktemp -d)"
    tmpmnt="$isotmp/tmpmnt"
    buildtree="$isotmp/buildtree"

    mkdir "$tmpmnt"
    if am_root; then
        MOUNT="mount"
        UMOUNT="umount"
    elif [ -x /usr/bin/sudo ]; then
        echo "Attempting to use sudo to gain mount capabilities..."
        MOUNT="sudo mount"
        UMOUNT="sudo umount"
    else
        echo "WARNING: Couldn't find sudo and not running as root." >&2
        echo "WARNING: Trying to loopback mount the iso anyway..." >&2
        MOUNT="mount"
        UMOUNT="umount"
    fi
    $MOUNT "$file" "$tmpmnt" -o loop
    cp -a "$tmpmnt" "$buildtree"
    $UMOUNT "$tmpmnt"
    rmdir "$tmpmnt"

    chmod -R u+w "$buildtree"
    for i in $(find "$buildtree" -name "initrd.gz" -o -name "initrd.img"); do
        initrd_append_fw "$i" "$fwfile" "$i"
    done
    isolinuxpath="$(cd $buildtree && find . -name isolinux.bin | head -1 | cut 
-b 3-)"
    mkisofs -r -J -b "$isolinuxpath" -c boot.cat \
                -no-emul-boot -boot-load-size 4 -boot-info-table \
                -o "$outfile" "$buildtree"
    rm -rf "$isotmp"
fi

if is_initrd "$file"; then
    initrd_append_fw "$file" "$fwfile" "$outfile"
fi

echo "Output in $outfile"

rm "$fwfile"
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users