Koozali.org: home of the SME Server

Install SME from USB pen?

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #30 on: April 05, 2005, 02:57:54 PM »
Status:

Things does work. Have made an USB stick installer for one other Linux distribution, not the SME server yet. It boots from the USB stick, it starts to copy over files, but so far I have stopped it before it has formated the hd (on my windows workstation !!!)

The SME server installation CD is buildt up in a bit different way, and it is rateher complex, so I figured out I had to do one more easy and "stright forward and easy" installation first.

I think the first Linux USB installer from USB does work now, even though I have not used it for making a complete installation yet. I think it is possible to make a simular USB stick installer for the SME server as well (99.999 % !) even though it is more complicated. (The files for the bootup is not directly accessable at the SME, they has to (?) be pulled out (?) from "images". On the other Linux distribution I used they were direct accessable, and it was not a number of "images" like for the SME, it was only one alternative, and all files was direct available so the could just be copied over.

tariqf ->

One thing I am courious about - Why do you want to make an USB stick installer ? After all it will only be usable on rather new PC's, and I think there even might be som new PC's that do not fully do support from a USB device.

Another thing is that you can not just build a USB stick installer and publish it for download like an ordinary ISO and then burn it over to the USB pen like you burn a installation CD.

The USB stick installation variant will require som "manual hand work" making the USB stick bootable and to build it up like a fat or fat 32 Linux file device.

The reason why I jumped into this question was that I neved had made a Linux installation on any electronic memory unit, and I was rather courious about "how to make a _embeded_ Linux, without a floppy or an harddisk so it can run just directly from an electronic media".

Then I thought that a USB installer of "some Linux distribution" could be an interesting variant of this more general consept.

Actually I believe now that to install a Linux that boot off from a USB stick is the easy variant. To make a USB stick installer is quite a lot more difficult. (Because there is few examples, to look at. Have not found any.) To make a USB stick installer for the SME is more complicated than to make it for a more "easy" Linux instalation, because of the certain file structures on the SME installation CD (Using all thos "images".)

(Have 3 different Linux distributions + 1 Linux installer (,I hope, not completely verified yet), running from USB sticks now.)

But if things can be done, the other interesting question is "for what ?" One other thinkable variant could be to actually run the SME server from a USB stick or from a Compact Flash. Then there is a "for what ?" question. If it work that way that all datas is in the ram and all your web pages and all your datas is gone when you turn off the PC, that might not be a much practical soultion ??! (Well they could possible be in the USB stick as well.)

I'm courios about ideas about how to use a USB stick installer or other variants in a practical way.

By the way .. I think there is basically two different ways of doing these things with "the electronic memory".

The one way is to let the datas pass trough a USB controller to the electronic media, a USB stick or a CF in a USB reader (as alredy done.)

The other way is to use a "IDE to Compact Flash converter" so the datas will pass trough the IDE controller instead, so the operating system will "see" the electronic memory as an IDE harddisk. Theoretically the "server distribution" could be just a Compact Flash Card, with a preinstalled server, that you plug in to the PC.

(Have not seen description of any USB device with a Linux file system, only fat, fat32 and NTFS. I believe that the IDE/CF soulution might allow Ext2/3 or other native Linux file systems (???))

Any ideas ?  :hammer:

Best reg Arne.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #31 on: April 05, 2005, 03:20:58 PM »
Drywalldude ->

How does Mandrace from a USB stick work, and how do you install it ?

I started off with 3 different USB stick installations (Slax, Damnsmalllinux and floppyfw) to look for a "typical patern" or how things "normally" is done.

I think it lokks like there is no "normaility" and that they are basically different.

I think the "floppyfw" variant is the "cleanest" one so this was actually that variant I used as an basis for making the USB installer, that I hope works now. (But yet not with SME).

I'm courious if the mandrake variant has some other or equal smart solutions for booting and comunications against the file system.
......

Offline wellsi

  • *
  • 475
  • +0/-0
    • http://www.wellsi.com
Install SME from USB pen?
« Reply #32 on: April 05, 2005, 11:02:54 PM »
I have used RUNT before - a Linux distro specially to run from USB pen/thumb drives. I have forgotton how I had it working - just followed the instructions from the web-site.

I haven't looked into doing an install from a USB drive,  but do manage to install SME without floppy/CD as I use (or maybe mis-use) the Thin Clients contrib. This allows you to install SME on any other machine on the network - as long as the target machine(s) can boot off the LAN or  temporary use of boot floppy/CD on PCs that cannot boot from LAN.
............

Offline tariqf

  • ****
  • 179
  • +0/-0
downloading usb distro
« Reply #33 on: April 06, 2005, 10:57:28 AM »
Hi it is possible to provide a usb download as I've seen other distros do it. We could simply provide a small boot image which is written to the usb using zcat and then the user simply copies the chosen SME iso onto the usb. This is how it's done with debian http://d-i.pascal.at/.


I managed to create a bootable usb using;

(1) Make sure usb is fat16 formattted and unmounted
(2) syslinux /dev/sda1
(3) mounted the usb and copied over the contents of boot.img from the sme server cd (by first mounting the boot.img with mount -o loop ...)

this boots and loads linuz then says "ready" and reboots! I'm sure I'm almost there I just need to see how the sme boot.img decides what to do when it gets to the "ready" point or adapt the debian example and put the sme server iso onto the usb.


will take this further tonight.

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #34 on: April 06, 2005, 09:17:47 PM »
You are working from Linux ? I'm working from Windows 2000 so it might be slightly different. I think what hapens is that it does not remount the file system on the usb stick when it reboots. Thats the reason that it is hanging, I believe.

Further on I also believe that the syslinux.conf file is the central file that set up the proper parameters neccessary for reading the filesystem during reboot.

At the implementation that does start the reboot and starts the installation this file lookes like this over here:

<startt>

default usb

label usb

kernel vmlinuz
append  rw init=/linuxrc initrd=initrd.img root=/dev/ram0 source=/dev/scsi/host0/lun0/part1 text askmethod upgradeany

<end>

I think/believe that these parts are are application specific for this distribution:

vmlinuz
initrd.img
text askmethod upgradeany

Don't know for sure, but believe that the rest of it is general PC/Linux to mounting, booting and obtaining contact with the USB file system.

By the way I think the proper code for giving it a bootable "mbr" from Windows is:
syslinux.exe -m e:
Where e: is the drive letter.

Arne.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #35 on: April 07, 2005, 12:02:22 AM »
Status:

The syslinux.cnf file now looks like this:

prompt 0
implicit 0
timeout 0
default accept

label accept
  kernel vmlinuz
  append rw init=/linuxrc initrd=initrd.img root:=/dev/ram0 source=/dev/scsi/host0/lun0/part1 ks=ks_stub.cfg class=kickstart text devfs=nomount ramdisk_size=8192

A number of system files/images has also been copied up to the root at the USB stick.

Booting works, it's finding the "MBR" loading the initrt.img, autodetecting the hardware, remounting the filesystem etc ..

It comes up with the menue:

Welcome to the SME server, change language.

Then select keyboard.

Select media: CD ROM / HD

Selecting HD /dev/sda1

It then says that it can not find the CD ROM images.

Had a number of bugs before where it said it could not find the kick start file.

Don't know really what a kick start file is, but still wonder if I have given it a kick start file for a CD rom so its looking for images with a CD rom file format (ISO 9something ..??)

Think it can be done, but there is a lot of small tricky things.

One problem for me now is that I do not really now what "kick start" is (even though I have heard the word some times.)

Arne.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #36 on: April 07, 2005, 01:32:55 AM »
I then tried do copy over the whole SME iso image to the USB stick.

Ut booted like before from the USB stick and the SME boot image. Then it comes up with the menues for selection of language and keyboard. After that it ascs for installation media. When I then select /dev/scd1 it finds the iso image giving this message:

Running anakonda - please wait.

After a while it is hanging with this message:

No such file or directory: /tmp/ks.cfg

I guess it still has something to to with this "kick start function."

One thing I am wondering about now is if these problems now is related to reading files/image from a fat file system, and if these problems is the equivalent of those you would have if installing with the intallation files on a FAT harddisk. Don't know, but wonder if it could be like that. (???) I think it does not have any problem to see the USB stick as a fat formated SCSSI drive (???).

Any ideas ?  :pint:


Arne.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
......

Offline tariqf

  • ****
  • 179
  • +0/-0
tconfig files
« Reply #38 on: April 07, 2005, 10:20:30 AM »
Just a thought but as you are doing this through windows  are you will need your config files in unix format not DOS format as mentioned here http://rocks.npaci.edu/papers/rocks-documentation/faq.html#KICKSTART-FILE.

I'm not sure how you can ensure this from windows as I always do mine in vi on a linux box.

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #39 on: April 07, 2005, 01:58:16 PM »
Don't know, could be you are right, but I'm afraid there is one other basic problem.

The way I try to do the installation is by telling the Linux installer that the USB stick is a SCSSI harddisk formated with fat and then to make the installation from that. It works for a while during the boot up prosess, but then, there might be a rather seriously and big problem:

From Redhat 9.0 documentation:

"Hard drive installations require the use of the ISO (or CD-ROM) images. An ISO image is a file containing an exact copy of a CD-ROM disk image."

OK, this forst one was not so bad, but then:

"Hard drive installations only work from ext2, ext3, or FAT file systems. If you have a file system other than those listed here, such as reiserfs, you will not be able to perform a hard drive installation."

If this is right it can not be done the way that I try to do it, unless there is some smart way arount it.

I it possible to work trough Linux and then make give the USB stick an ext2 file format and then make it bootable ??? My first thought is "no", but then my second is "why not ?"

By the way there is also one other basic way of doing the file mounting as a "USB file system". (Think I used that on one of the other usb stick installations.) Could that help ?

The Redhat distro can be installed via network (??), could it be some ideas to pick up here ?

I'm just a bit pesimistic about the "scssi/fat method" just now. (Even thouh I think it worked for the other Linux distribution I tried it on, that had a CD file stucture that was quite different from the sme/redhat variant.)

I hope you can find a way around it working direct trough Linux. (Shame on me I don't have a Linux workstation, not just now ..)

Arne.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #40 on: April 07, 2005, 02:04:53 PM »
What do I say .. one other basic problem, I can't read:

"Hard drive installations only work from ext2, ext3, or FAT file systems."

It says "or FAT file systems" !!!

OK, so I hope I can be happy to say that my last post was completely nonsence.

Looks like Fat file systems can be used  :hammer:
......

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #41 on: April 09, 2005, 11:01:54 AM »
Have tried diverse ways to solve this issue but it continous to claim that it can not find the kick start file.

I'm afraid that the problem might be that some of the "hidden" or "invisible" system files of the sme installation CD is not contapable with the way that I try to do the mounting of the USB stick as a scssi drive (??!!).

I found this description of the boot process, at the slax.org site that I think is a rather general one (with some minor modifications, this is for the slax distro, booted from CD.):

1) bios detects the CD, reads isolinux.bin and executes it.
2) isolinux.bin contains driver for CDrom and it reads isolinux.cfg from the CD
3) isolinux.cfg contains instructions to load vmlinuz file and initrd.gz file into memory, and execute vmlinuz (it's Linux kernel)
4) linux kernel uses initrd.gz as it's root filesystem. It creates virtual harddisk in RAM and extracts the content of the .gz archive to it. The archive contains essential binaries, ash shell and linuxrc script, which is executed.
5) linuxrc script mounts all available devices (kernel drivers are used now) and if livecd.sgn file is found in some mounted device then it's assumed to be SLAX Live CD.
6) data dirs from /base/ directory, /modules/ directory and /optional/ directory are mounted somewhere and it's content is unioned by unionfs to /union (still in ramdisk)
7) /union is chrooted. This way it seems like /union is the root filesystem /
 /sbin/init is started (in fact, it's /union/sbin/init, but nobody knows  )
9) init reads /etc/inittab and starts with executing apropriate daemons, services, etc. Then login is executed and after login shell is started.

If anybody is able to solve the mysterios about how to pick up the kick start file (or some other solution) it would be great ...

I'm think I'm a bit stuck on that item ..

Best reg Arne.
......

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #42 on: April 10, 2005, 11:14:34 PM »
Hello !

Have to admit am rather stuck and lost on this one.

If someone else have a good idea or moke some progress with the USB pen installer, please leave a message.

One thing I'm wondering about is if it cold be that the SME kernel is missing support for the actuall USB comunication. I hope I'm wrong about that.

Arne.
......

Treis

I can't get Slax to boot from USB
« Reply #43 on: April 15, 2005, 11:10:10 AM »
The CD works great when I boot it from the Live CD.

BUT

I can't get Slax to boot from USB. I have used the command: ./create_bootdisk.sh . /dev/sda1 /dev/sda SLAX

All the files seem to be there, only problem is that it gives me a dos error that it's not bootable, when I try to boot up from USB.

please can someone help!

Offline arne

  • ****
  • 1,116
  • +0/-4
Install SME from USB pen?
« Reply #44 on: April 15, 2005, 02:59:46 PM »
A little bit special to discuss Slax desctop on the sme forum, but, ok if it can help the "sme on USB project"..

The main thing for the Slax is this change in the syslinux.conf file:

append probeusb max_loop=255 initrd=initrd.gz init=linuxrc livecd_subdir=/ load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=9999 root=/dev/ram0 rw

By the way, the sme distro also use the syslinux program as startup/boot device. (But I don't think they have compiled in the same kernel modules as the sme server an vise versa.

Works so fare only for the 2.4.x kernel variant.
......