Announcement

Collapse
No announcement yet.

Splashtop on USB stick

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kano
    started a topic Splashtop on USB stick

    Splashtop on USB stick

    Here you find some scripts, the first is to create an USB stick which can be booted on several motherboards - vendor independ to check out the system. The second script can be seen as an optional way to create a hd image which can be used together with VirtualBox to start the system. VirtualBox has to be configured to automatically enable the USB stick - best using the USB filter setting as the apps are loaded via USB. I use the kernel which is stored on the interal SSD therefore you need to emulate it. In order to store additional data on the stick, two partitions are made. If you try it on real hardware and you can not boot from USB, just put the ce_bz kernel from the stick onto your hd and boot it with your standard bootloader. When you are able to start it but you don't have got LAN working, the cheapest solution is to add a Realtek 1 GBit ethernet adapter - this is supported. You might experince problems with front usb connectors - in that case try the ones directly onboard - even there try all ports if needed.

    a) Create USB stick

    Change DEVICE to match your stick. Also set IMAGE to the image you want to use.

    Required tools which are not always preinstalled are: lilo (or mbr with a simple change), syslinux

    Code:
    #!/bin/sh
    DEVICE="/dev/USBSTICK"
    IMAGE="FILE.IMG"
    offset=$(($(sfdisk -d $IMAGE|grep start=|head -n1|sed 's/.*start=\s*//;s/,.*//')*512))
    OPTIONS="umask=000,shortname=mixed,quiet,utf8"
    DIR=/tmp/target
    INPUT=/tmp/input
    umount ${DEVICE}1 $INPUT
    mkdir -p $DIR $INPUT
    mount -o loop,offset=$offset,$OPIONS $IMAGE $INPUT
    dd if=/dev/zero of=$DEVICE count=1
    sfdisk -D -uM $DEVICE <<EOT
    ,240,6,*
    ,,b
    EOT
    #install-mbr -p D ${DEVICE}
    lilo -s /dev/null -M ${DEVICE}
    mkdosfs -F16 -nDVMUSB ${DEVICE}1
    mkdosfs -F32 -nDATA ${DEVICE}2
    syslinux -s ${DEVICE}1
    mount -o $OPTIONS ${DEVICE}1 $DIR
    cat > $DIR/syslinux.cfg <<EOT
    default /ce_bz
    EOT
    cp -av $INPUT/* $DIR/
    umount ${DEVICE}1 $INPUT
    sync
    b) Inject GRUB into image - bootable!

    Set IMAGE to the image you want to use. Also check the postition of the grub stage1/2 files. Example for 32 bit Debian/Ubuntu.

    Code:
    #!/bin/sh
    IMAGE="FILE.IMG"
    offset=$(($(sfdisk -d $IMAGE|awk '/start=/{print $4}'|head -n1|sed 's/,//')*512))
    uuid=$(dd if=$IMAGE skip=$((0x27+$offset)) bs=1 count=4 2>/dev/null|hexdump -e '"%X"'|sed 's/\(....\)/\1-/')
    LOOP="/dev/loop0"
    OPTIONS="umask=000,shortname=mixed,quiet,utf8"
    DIR=/tmp/target
    mkdir -p $DIR
    losetup -d $LOOP
    losetup $LOOP $IMAGE
    umount $DIR
    mount -o loop,offset=$offset,$OPIONS $IMAGE $DIR
    mkdir -p $DIR/boot/grub
    cat > $DIR/boot/grub/menu.lst <<EOT
    timeout 0
    title Test
    kernel /ce_bz
    EOT
    cp -v /usr/lib/grub/i386-pc/stage1 $DIR/boot/grub
    cp -v /usr/lib/grub/i386-pc/stage2 $DIR/boot/grub
    grub --device-map=/dev/null --batch <<EOT
    device (hd0) $LOOP
    root (hd0,0)
    setup --stage2=$DIR/boot/grub/stage2 (hd0)
    EOT
    cat > $DIR/splash.idx <<EOT
    root=UUID=$uuid
    EOT
    umount $DIR
    losetup -d $LOOP
    c) Try image with qemu

    Code:
    qemu -m 256 -hda FILE.IMG
    d) Convert image to VMware harddisk image

    Requires qemu.

    Code:
    qemu-img convert FILE.IMG -O vmdk test.vmdk
    e) Install onto FAT32 partition (without grub-install ntfs would work too).

    Requires grub.

    Code:
    #!/bin/sh
    PARTITION="/dev/partition"
    IMAGE="FILE.IMG"
    offset=$(($(sfdisk -d $IMAGE|grep start=|head -n1|sed 's/.*start=\s*//;s/,.*//')*512))
    OPTIONS="umask=000,shortname=mixed,quiet,utf8"
    DIR=/tmp/target
    INPUT=/tmp/input
    umount $PARTITION $INPUT
    mkdir -p $DIR $INPUT
    mount -o loop,offset=$offset,$OPIONS $IMAGE $INPUT
    mount $PARTITION $DIR
    mkdir -p $DIR/boot/grub
    cat > $DIR/boot/grub/menu.lst <<EOT
    timeout 0
    title Test
    kernel /TEST.IT/ce_bz
    EOT
    grub-install --recheck --no-floppy --root-directory=$DIR $PARTITION
    grub-install --recheck --no-floppy --root-directory=$DIR $PARTITION
    mkdir -p $DIR/TEST.IT
    cp -av $INPUT/* $DIR/TEST.IT/
    cat > $DIR/splash.idx <<EOT
    root=UUID=$(/lib/udev/vol_id -u $PARTITION)
    /TEST.IT
    /TEST.IT
    EOT
    umount $PARTITION $INPUT
    sync
    PS: The used IMAGE is really easy to find when you look for updates of boards with Splashtop support like P5Q.

    Edit: I looked a bit at the Win installer (which you can use of course too, just boot ce_bz with any bootloader you want to use, like grub4dos) and found that there was a file called splash.idx in the root of the partition. Then it was fully clear to me what to do - the file needs to be there when you don't want to start it via USB (emulates the SSD). The structure is easy:

    Code:
    root=UUID=$uuid
    /DIR.SYSTEM
    /DIR.USERDATA
    where $uuid is similar to /dev/disk/by-uuid/$uuid. the lines 2 and 3 are optional and point to the files where it is installed, the userdata dir has to contain the files matching user*. With that info you could have multiply installs on one partition - just set the dir names to the ones you want to use and even share the userdata between em. So - I think thats all. If needed I could add some hints for Grub4Dos.

    Edit 2: Use 240 mb instead of 220 mb in order to add more custom addons. You can use even more if want to add extra apps.

    Extra hint: If you want to modify existing packages you can get rid of the error message that the install was corrupted using:

    Code:
    dd of=version bs=1 seek=32 count=0
    in the same dir with the sqx packages. You do not need that if you only add more packages.
    Last edited by Kano; 08-19-2008, 07:45 AM.

  • Kano
    replied
    When you have got a splashtop button it does not matter, when the device is usb and the right filesystem and label it should be found.

    Leave a comment:


  • tony37
    replied
    headless server

    I just purchased an Asus 1005PE which led me to this thread. I have a problem which probably is much simpler than this. I have an MSI Wind nettop configured as a server. It needs to be installed 'headlessly'.

    The BIOS does not allow a USB drive to be the priority boot device. It does, however, have a Compact Flash slot which can be set as the first boot device.

    What I would like to have is a 'booter' that runs on the Compact Flash device that scans the usb ports, if it finds a usb drive mounted with a specific label, it will launch it resulting in initial installation of the server software to the hard drive. If it does not find that usb drive, it will boot normally from the hard drive. The key is that this must be non-interacive since there will be no keyboard or monitor available. Once the server software is installed or the system booted from hardrive, it will be administered via ssh.

    Leave a comment:


  • Kano
    replied
    @VboxVA

    The source for ce was available? I did not know that, maybe you could give me a hint where...

    Leave a comment:


  • VboxVA
    replied
    VA and Driver Help

    You guy's are doing some great work - thanks. I'm an old SunOS internals developer (one project was, I wrote sun's first SCSI driver and SDK and worked with VRTX32/64 firmare for years). I've been using and refactoring and moding VirtualBox since it was first open source and I agree with other posts, it rocks. But I'm really beginning to scarp off some deep unix rust and learn some of the newer linux dev tools. Most of my dev, due to projects to pay the bills, has been MSVS and Java the last 10yrs. With everyone's blogs, special thanks to Kano, Drosky and others, I've been able to do some of the basic mods and create a Vbox guest dev environment, make clean all, then flash the mods back to the SDD on my P5Q Deluxe and boot and run new VA's. It helped when Asus temperarly posted the full source for ExpressGate/SlashTop (and I mean full source, core, kernal, ce, bootstraps, bios api, tinyx, busybox, appliances, etc). I've also followed others lead and began utilizing drivers and utilities from other linux baselines. I'm hitting the 512 onboard ROM limit so I interested in learning about the work others may have done to combine booting SSD with extensions in HDD.

    I see that "slashtop for business" has some of the direction that I'm interested in persueing. But falls short in it's timing, vision and value, not to mention SDK (2.?).

    I'm interested in helping to get ExpressGate to directly support the ICH10R firmware RAID 0,1,5,6,10 (by possibly updating the iswraid.sourceforge.net) and hosting Vbox via an va-sqx or other (sort of a firmware ESX server lite). Heck, I'll remove all the other sqx's if it boots and loads guestOS like I think it will. I've refactored the Etch based VirtualBox 3.1 code for some significant IO improvements and small footprint. I've tried to just move the Vbox Etch packages as VA's but I think it needs drivers built clean or I need of more Naval Jelly. I've moved kadb (for small basic debugger) over to try and help debug from within SSD, but, with ExpressGate as host I can't get a Vbox debug dump to understand source of panic. Works fine as Windows 7 hostOS to Vbox to ExpressGate guestOS running Etch Vbox (sounds sick when I put it on paper). Panics when started in SSD/flash. That's why I'm thinking VT drivers? Please help, stop me from reinventing the wheel or maybe suggest a better way to debug within SSD.

    I'd like to learn more about others work and experiences in virtual appliances and drivers. Not to take anything off Phoronix, but, I've seen a couple blogs regarding others interested in opening a sourceforge project or private room for VAs and drivers. Maybe this already exists somewhere (IRC or other) and possibly to meet my goals I just need some example VA/drivers. If so, please help by pointing me into these projects or repositories. I think others, including myself, would like to see everyones work additive and possibly help.

    Thanks again for evryones time comsuing help so far.

    Leave a comment:


  • Kano
    replied
    The splash.idx points to the uuid of the partition. Can be fat or ntfs.

    Leave a comment:


  • lphor
    replied
    SPLASHTOP on System with Encrypted Parition

    I am trying to run full disk encryption on my main OS, and still keep Splashtop functional. I am running a Sony VGN-NW270F which appears to have the onboard chip as well as some HD based components. After I encrypted the drive, trying to start Splashtop comes up with "Splashtop is not installed..." since it can't access the encrypted partition.

    I am thinking of trying to move the HD based components to an unencrypted NTFS partition. What do I need to make present on the unencrypted partition? If I just move th folder "SPLASH.SYS", and "SPLASH.000" and the file SPLASH.idx will that be enough?

    Thanks for your help! You all have put some serious work into this.

    Leave a comment:


  • arielgrin
    replied
    &quot;Express Gate is not installed...&quot;

    Originally posted by Kano View Post
    I don't know if you used it for testing in vbox already, then you might have got a splash.idx file on the stick you have to remove first. Or maybe there is a file on your hd with that name (only in / of a partition).
    I didn't try it on VBox. Version 1.2.4.0 does not have a splash.idx file, there is no such file on the usb stick nor on the hard drive. I have Windows XP on the hard drive, I created the usb stick using Knoppix 6.0.1 installed on a VMWARE virtual machine.

    Leave a comment:


  • Kano
    replied
    I don't know if you used it for testing in vbox already, then you might have got a splash.idx file on the stick you have to remove first. Or maybe there is a file on your hd with that name (only in / of a partition).

    Leave a comment:


  • arielgrin
    replied
    Need some help

    Dear Kano: I successfully executed your script to install Splashtop on USB with grub boot. I can get it to boot, but unfortunatelly, I get the infamous "EXPRESS GATE IS NOT INSTALLED IN THIS COMPUTER OR THE INSTALLATION IS INCOMPLETE..." warning.

    I tried SSD version 1.2.4.0 and also 1.4.10.8, both with the same result.

    Maybe I understood it the wrong way, but that script is supposed to work with "non-express gate" Asus motherboards right?

    I have an Asus M2N32-SLI Deluxe, which of course doesn't have the Express Gate feature.

    Can you guide me on what I may be doing wrong?

    Thanks in advance, Ariel.

    Leave a comment:

Working...
X