Rick Miles | 12 Jun 2012 06:40
Picon

nfs and qemu install

I've used nfs before for fileshares on our lan so I'm not a stranger there but I'm not so sure whats going on with a system, on qemu as an nfs client. I rsynced current last night

Normally have dhcp via modem but changed to static ip configured with netconfig. Workstation 192.168.1.2 and gateway 192.168.1.1. Nobody else on lan so 192.168.1 3 and 4 are not assigned to anyone. As far as I know I can use rc.local-additions settings as is. I have edited /etc/exports as per qemu-install.txt. The one thing I am not clear on is what ip I assign the qemu machine do I give it 192.168.1.1 for a gateway and use 192.168.1.2 for the server? Should I give gemu machine a diffeent ip? I haven't bridged anything but a modem and that was a very long time ago.

Qemu-install.txt just says
                 Choose '3 - Install from NFS (Network Filesystem)'

                  Enter the IP address: 192.168.1.1
                  Enter the directory: /export/armedslack/armedslack-current/slackware

My path is different, thats all. I've tried for a couple hours using diffferent ip settings and can not get an nfs mount. Dropped out of setup and tried cli line and after making an entry to /etc/fstab but nfs but i just time out.

I'm not quite sure what I should search for on the net and what I have found has not enlightened me. My qemu-1.0.1 install is from a slackbuild and I have run the debian raspberry pi build successfully on it. Host system is salix-13.37.

Perhaps someone can give me a heads up on this



_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Rick Miles | 13 Jun 2012 10:59
Picon

Re: nfs and qemu install

On Tue, 2012-06-12 at 14:40 +1000, Rick Miles wrote:
> I've used nfs before for fileshares on our lan so I'm not a stranger
> there but I'm not so sure whats going on with a system, on qemu as an
> nfs client. I rsynced current last night
> 
> Normally have dhcp via modem but changed to static ip configured with
> netconfig. Workstation 192.168.1.2 and gateway 192.168.1.1. Nobody
> else on lan so 192.168.1 3 and 4 are not assigned to anyone. As far as
> I know I can use rc.local-additions settings as is. I have
> edited /etc/exports as per qemu-install.txt. The one thing I am not
> clear on is what ip I assign the qemu machine do I give it 192.168.1.1
> for a gateway and use 192.168.1.2 for the server? Should I give gemu
> machine a diffeent ip? I haven't bridged anything but a modem and that
> was a very long time ago.
> 
> Qemu-install.txt just says
>                  Choose '3 - Install from NFS (Network Filesystem)'
> 
>                   Enter the IP address: 192.168.1.1
>                   Enter the
> directory: /export/armedslack/armedslack-current/slackware
> 
> My path is different, thats all. I've tried for a couple hours using
> diffferent ip settings and can not get an nfs mount. Dropped out of
> setup and tried cli line and after making an entry to /etc/fstab but
> nfs but i just time out.
> 
> I'm not quite sure what I should search for on the net and what I have
> found has not enlightened me. My qemu-1.0.1 install is from a
> slackbuild and I have run the debian raspberry pi build successfully
> on it. Host system is salix-13.37.
> 
> Perhaps someone can give me a heads up on this

I'll sort the above out later.... right now I have armedslack-current
installed in qemu using this work around:

1) Set up an armhost directory with utilities, kernel image and initrd
as per the INSTALL_QEMU.TXT instructions.

2) Format an sdcard with three partitions, First partition will be root
filesystem second swap and third is used for the slackware directory
from armedslack-current. With two hard drives onboard the sdcard will be
seen as /dev/sdc

The largest card I had was 8gb. I gave sdc1 ~5.2gb, sdc3 ~1.76gb and the
balance was sdc2 for swap. To get the /slackware directory to fit in
sda3 I deleted the contents of package series I would not be installing,
that is, e, kde, kdei and t. 

3) Format the partitions ext4, swap, ext4, mount sdc3 and copy
armedslack-current/slackware into the third partition

4) Create a harddisk.img using the command
  # dd if=/dev/sdc of=/your-path/armhost/harddisk.img bs=1M
Note that my sdcard in a card reader on my box is /dev/sdc.

5) Once image has been created cd into armhost and start the install by
running the command ./installer_launch.

6) After logging in as root and before running setup, create a directory
to mount the partition containing /slackware and mount it. The installer
will see the partition as sda3. 
  # mkdir sda3
  # mount /dev/sda3 sda3
Note that you can not use /mnt in the root filesystem.

7) Run setup and when prompted for source media select 6. Install from
pre-mounted directory. When prompted for a source directory I enter the
path as per step 6 above, i.e. /sda3/slackware.

8) The rest of the install is standard slackware. Follow the prompts.

9) When the installation was finished I shut down, edited the 
ROOTFSDEV variable in the disk_launch script from sda2 to sda1, saved
the script and then ran the script to boot into armedslack-current on
qemu.

Maybe now I'll figure out what I was doing wrong with the NFS
install :^! or maybe I'll see if I cam get my wireless dongle working
first since I plan on eventually running this on a raspberrypi :<)

Cheers
stanley garvey | 14 Jun 2012 20:12
Favicon

Re: nfs and qemu install

On Jun 13, 2012 09:59 "Rick Miles" <frmrick <at> aapt.net.au> wrote:
On Tue, 2012-06-12 at 14:40 +1000, Rick Miles wrote:

Qemu-install.txt just says
Choose '3 - Install from NFS (Network Filesystem)'
I plan on eventually running this on a raspberrypi :<)

Cheers

Hi,
the Qemu-install.txt is quite old and you may save yourself some headaches by using VDE.
see:
 alien.slackbook.org/dokuwiki/doku.php?id=slackware:vde
This is how I Installed armed slack on qemu.
compile and install vde
use a script like this to set up networking: (As root)

#!/bin/bash
modprobe tun
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
vde_switch -tap tap0 -daemon
chmod -R a+rwx /var/run/vde.ctl
ifconfig tap0 192.168.2.1 broadcast 192.168.2.255 netmask 255.255.255.0

This give me a subnet 192.168.2.?? for virtual machines, My router is 192.168.0.1 and my host machine is on 192.168.0.3. here is the host routing table after executing the above script (man route)

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     *               255.255.255.0   U     0      0        0 tap0
localnet           *               255.255.255.0   U     0      0        0 eth0
loopback         *               255.0.0.0          U     0      0        0 lo
default         192.168.0.1     0.0.0.0           UG    1      0        0 eth0

To install armedslack on qemu I do this:
make a directory for your VM, and in that directory make some subdirs, HardDrive, CDROM, Images.
create a raw disk image in HardDrive using dd.
copy needed initrd's to images and create an iso of the armedslack distro with mkisofs (no need to be bootable).
then run an install script like this one:

#!/bin/bash
# install armed slack
qemu-system-arm -M versatilepb -m 256 -kernel Images/zImage-versatile -hda HardDrive/harddisk.img -cdrom CDROM/armedslack.iso -initrd Images/initrd-versatile.img -append "root=/dev/ram rw"

Now sit back and install, the installer will find the cdrom and install the packages from it.
to run the installed VM use a script like this one.( adjusting per your needs :))

#!/bin/bash
# Start armed slack
qemu-system-arm -M versatilepb -m 256 -net vde,vlan=0 -net nic,vlan=0,macaddr=52:54:41:53:13:37 -kernel Images/zImage-versatile -hda HardDrive/harddisk.img -cdrom CDROM/armedslack.iso -localtime -usb -no-reboot -initrd Images/initrd-versatile.gz -append "root=/dev/sda2 rootfs=ext4"

After configuring the network with netconf ( I like static ips for my VM's ) the VM's routing table looks like this:

___________________________________
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet           *               255.255.255.0   U     0      0        0 eth0
loopback         *               255.0.0.0          U     0      0        0 lo
default         192.168.2.1     0.0.0.0           UG    1      0        0 eth0

Good luck getting it to work on a slackberry pi, I have done just that. you will need to compile a stock Raspberry pi kernel, (good luck on back porting 2.6.37 to broadcom chip, would be cool though, let me know if you do.)
get your .config from a running kernel, arch is good.
copy your /root from qemu to your sd card (boot needs to be empty)  linux partion and your uncompresseed kernel to the boot vfat partion as kernel.img, don't forget to copy the kernel modules to /lib/module, edit your fstab and cmdline.txt, phew! reboot and voila!

Minor niggles: ntpd wont set the clock, however ntpdate will, you go figure? rootfs always loads as rw, perhaps a quirk of the pi boot loader?
if you need alpha audio modprobe snd-bbcm2835
X will require building xf86-video-fbdev, and you will need to get an xorg.conf from a running pi.

all the best.
Stanley


I hope that helps
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Rick Miles | 14 Jun 2012 21:24

Re: nfs and qemu install

On Thu, 2012-06-14 at 19:12 +0100, stanley garvey wrote:
On Jun 13, 2012 09:59 "Rick Miles" <frmrick <at> aapt.net.au> wrote:
On Tue, 2012-06-12 at 14:40 +1000, Rick Miles wrote:

Qemu-install.txt just says
Choose '3 - Install from NFS (Network Filesystem)'
I plan on eventually running this on a raspberrypi :<)

Cheers

Hi,
the Qemu-install.txt is quite old and you may save yourself some headaches by using VDE.
see:
 alien.slackbook.org/dokuwiki/doku.php?id=slackware:vde
This is how I Installed armed slack on qemu.
compile and install vde
use a script like this to set up networking: (As root)

Thank you very much for this. I have my weekend project now. This is all new stuff for me. I've been lazy on linux for a long time

<snipped>

Good luck getting it to work on a slackberry pi, I have done just that. you will need to compile a stock Raspberry pi kernel, (good luck on back porting 2.6.37 to broadcom chip, would be cool though, let me know if you do.)
get your .config from a running kernel, arch is good.
copy your /root from qemu to your sd card (boot needs to be empty)  linux partion and your uncompresseed kernel to the boot vfat partion as kernel.img, don't forget to copy the kernel modules to /lib/module, edit your fstab and cmdline.txt, phew! reboot and voila!

I had armed slack from raspberrypi.org/phpBB3/viewtopic.php?f=56&t=6132&hilit=armedslack running on a pi but fried the pi on a dodgy usb hub trying to use wifi dongle, keyboard and mouse. I have a backordered pi due the last week of June. I hope to get my hands a little dirtier then.
Minor niggles: ntpd wont set the clock, however ntpdate will, you go figure? rootfs always loads as rw, perhaps a quirk of the pi boot loader?
if you need alpha audio modprobe snd-bbcm2835
X will require building xf86-video-fbdev, and you will need to get an xorg.conf from a running pi.

Thanks for the heads up, When I don't know what should be working its nice to know what isn't.
_______________________________________________ ARMedslack mailing list ARMedslack <at> lists.armedslack.org http://lists.armedslack.org/mailman/listinfo/armedslack

--
Cheers

Rick
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Stuart Winter | 14 Jun 2012 22:59
Picon

Re: nfs and qemu install


> > > X will require building xf86-video-fbdev, and you will need to get
> > > an xorg.conf from a running pi.

I'm not sure why people say this -- this package is in Slackware ARM and
always has been.
stanley garvey | 15 Jun 2012 15:01
Favicon

Re: nfs and qemu install

On Jun 14, 2012 21:59 "Stuart Winter" <m-lists <at> biscuit.org.uk> wrote:
X will require building xf86-video-fbdev, and you will need to get
an xorg.conf from a running pi.

I'm not sure why people say this -- this package is in Slackware ARM and
always has been.
My mistake. I should have said X needs xf86-video-fbdev and requires an xorg.conf from a running pi.
Reason,I was looking at source/ x/X11/build/package-blacklist on a x86 dvd.

# We don't want this one, as it causes failure of X with no xorg.conf
xf86-video-fbdev

Off topic.
Nice to see people want armed slack on a Raspberry pi, I don't use Debian, Arch is better. I don't get apt-get and I don't want my dep's solved by a pacman. The Rpi is an educational computer. The kids will be getting one each for Christmas and I want them running slackware.

_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Stuart Winter | 15 Jun 2012 16:53
Picon

Re: nfs and qemu install


> My mistake. I should have said X needs xf86-video-fbdev and requires
> an xorg.conf from a running pi.
> Reason,I was looking at source/ x/X11/build/package-blacklist on a x86
> dvd.

Ah good.  You're the third person to say this so I was wondering if there
was a problem with a mirror service or something.

> Nice to see people want armed slack on a Raspberry pi, I don't use
> Debian, Arch is better. I don't get apt-get and I don't want my dep's
> solved by a pacman. The Rpi is an educational computer. The kids will
> be getting one each for Christmas and I want them running slackware.

Hopefully there might be in-tree support for it by then.  I'm not sure how
the lack of using an initrd is going to work in the current setup though.

I'm still thinking that I might leave this one to the community, as it's
nice to see some discussion around the RPi & Slackware ARM (albeit on
linuxquestions.org), and I can only provide support for a small range of
devices anyway.

--

-- 
Stuart Winter
Slackware ARM: www.armedslack.org
stanley garvey | 19 Jun 2012 00:56
Favicon

Re: nfs and qemu install

On Jun 15, 2012 15:53 "Stuart Winter" <m-lists <at> biscuit.org.uk> wrote:
My mistake. I should have said X needs xf86-video-fbdev and requires
an xorg.conf from a running pi.
Reason,I was looking at source/ x/X11/build/package-blacklist on a x86
dvd.

Ah good. You're the third person to say this so I was wondering if there
was a problem with a mirror service or something.
Having had some time to look at the Rpi this weekend , Armed Slack & X works fine without an xorg.config.

Hopefully there might be in-tree support for it by then. I'm not sure how
the lack of using an initrd is going to work in the current setup though.

 I don't think a conventional installer will ever work due to the way the Rpi boots, all distros I have seen are pre-installed images. There is is one for armed Slack but I can't be sure of its provinence, I'll do it my self thank you! Also It has done a major hatchet job on rc.S as the root file sytem is always mounted rw.

I'm still thinking that I might leave this one to the community,
Yes, if I were thinking of re-building the packages, would simply building then native on the Rpi optimise the code or do you have any tips regarding gcc flags?
 and I can only provide support for a small range of
devices anyway.
 Agreed.
Thanks for making it possible to run Slackware on Rpi.
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack

Gmane