- This topic is empty.
July 27, 2009 at 7:11 am #48417
As an ALIX board user, I was always bothered with opening the ALIX case, unscrewing everything to get access to the CF card, replacing the image and rebuilding it all.
I have finally figured out a way to get rid of that trouble!
Problem is in the second partition being a Z iso image mounted under /cdrom. You cannot access it from dd if not previously unmounted. The latter cannot be done from remote since ssh lies within the mounted image. So unless you want to do it manually from a serial connection, this is not possible for several reasons!
1. you would have to copy all the SSH required files within RAM under /(bin,sbin,etc).
2. You would have to stop all services without killing SSH and since this is done with the use of killall5, SSH gets killed since the script calling killall5 is not having the SSH pid! Trying without killall5 is fastidious if we want it to work for all cases, all services would have to be checked!
But by having either another partition of your CF card mounted under /mnt (for example) or a USB key holding the new CDROM.iso file you can trick the system reboot.
This is how it works:
I added a new script file in /etc/init.d, /etc/init.d/upgrade, and linked it in /etc/rc.d/rc6.d which holds what should be done during reboot.
Therefore right before unmounting the file system K60mountfs you add a link to upgrade (k55upgrade -> ../init.d/upgrade).
The system will thus have completely destroy all services allowing you to correctly unmount /cdrom, do your task of upgrading, and then terminate the reboot.
This is the upgrade script file I used (it is not checking anything and expects CDROM.iso to be in /mnt/):
echo "Upgrading /dev/hda2 to image in $IMAGE_NAME"
dd if=$IMAGE_DEV/$IMAGE_NAME of=/dev/hda2
I did try several times using image created from the dev kit from my work directly to my home through the internet and it worked great.
DISCLAIMER : THE NEW IMAGE SIZE HAS TO BE SMALLER THAN THE PARTITION DEDICATED TO IT OTHERWISE YOUR DATA PLACED IN THE THIRD PARTITION WILL BE SMASHED!!!
LESS THAN 145 MB IS OK, IN FACT A BIT MORE BUT WE KEEP SOME MARGIN HERE
Upon reboot, the upgrade file will have disappear since it is placed in the RAM root /.
Note that the idea could also be used for ALIX board to get completely upgraded provided a USB key holds the full disk image!
SchoopyJuly 27, 2009 at 3:11 pm #48418zevlagMember
I know many of us would really love a tutorial/walkthrough on how exactly to do this. This is a feature that is much desired.July 27, 2009 at 7:30 pm #48419
As Fulvio already asked, I will try to write a tutorial on the use of the dev vmware image. However I would also have some scripts allowing the creation of CF card image as well. So far I have not completely found a way to do it in a file (lack of knowledge here!).
Furthermore there are still many problems with the dev image regarding software compilation (dietlib, libdl, etc…).
For the upgrade the above script should be enough to go through provided you have the CDROM.iso. Of course it requires manual work.
My idea is to work on larger CF card as those are now so cheap and allow enough space for the second partition to be upgradable without size issue. Something like 200 MB would be good.
Note that we could also avoid having isolinux and thus the size of twice the kernel and initrd image, as in any case the boot is done from the first partition on the CF card.
However I suspect the ISO image is also used for the CDROM mode.
As you can see many things are possible. I saw many people requests which I could already integrate in a new CDROM.iso of 150MB.
This includes adding boot time sync for ALIX without battery, racoon.conf set for VISTA L2TP/IPSEC, etc…
Give me some time to create a new CF card image of lets say 2GB allowing later upgrade.
SchoopyJuly 31, 2009 at 6:22 am #48420
The development platform is almost ready for publishing. This consists of a vmware image of a modified CF card image with Ext2 partition format. So far I have made several upgrades of packages such as cyrsu-sasl, openssl, autoconf, automake, libtool and kernel 22.214.171.124.
Scripts have been added to ease the creation of new rootfs, correct ext2 initrd and generation of new compressed Z iso images.
There are still some issues with some links that I have to fix but this is minor.
I expect to be able to publish the platform soon under another web site with authentication (if I can manage that). You may have noticed that the above link is no longer available.
The reason is quite simple. Indeed and with Fulvio’s agreement, we shall not provide it publicly in order to avoid the spreading of tons of versions that will no longer be manageable. However you are welcome to participate in the development of new add-ons or updates by letting us now and I shall provide access to the development package.
I am investigating the possibility to use SVN to sync the different vmware dev images as the size is too large to allow full download (>1.5GB).
Note that this is still open and I will be more than happy to have your suggestions on how sync or packages could be done. Thanks.
SchoopySeptember 9, 2009 at 6:06 pm #48421hceuterpeMember
Any reason why those files are absent from your web server?
I was looking for those..
Thanks.September 22, 2009 at 10:37 am #48422kawarmcMember
Letting other developers download kind of a development image wil increase the addition of new features to this wonderful piece of software. By the way, thanks for the great job Fulvio.
As an example, we are now researching on the implantation of zeroshell for our organization and there is one feature we are missing. There is no way to automate backups.
We have a couple of coders that could implement a solution based on rsync over ssh but we have no idea how to begin the development. That is: is the whole project licesed under GNU? are the sources available, where?
The VMware image looks promising, but I guess Fulvio did not use a VMWare image when begun coding, so, how do you do it? :O
If needed, we can provide hosting space to hold the svn and that stuff, but isn’t it better to host it at sourceforge?November 16, 2009 at 8:14 pm #48423MahoruMember
I need some help, i want to use the image to update the kernel of an soekris box (i have buy an wifi n card, ath9k driver). But the new kernel dose not load (the old with the new CD Image load fine). Can you regenerate a kernel witch load with soekris box, thanks.December 21, 2009 at 8:13 am #48424
Not having a soekris box, I cannot really be of much help.
I do not know why it does not work, though I am currently trying it on an Alix.
Maybe it is a general problem, if not the kernel takes its argument from Fulvio’s, hence I do not understand what could be wrong.
Could you point me to some extra features for the kernel configuration?
SchoopyDecember 21, 2009 at 11:46 am #48425mr.AddamsMember
schoopy, can you correct rights on your ftp to make downloading of your image possible?
You don't have permission to access /~tschuepb/ZeroShell/Image.tar.bz2 on this server.
Thanx.. 🙄December 21, 2009 at 2:18 pm #48426December 29, 2009 at 1:55 pm #48427mr.AddamsMember
Get it. Thanx…October 11, 2010 at 5:01 am #48428stone76567Member
thanks for all the information ive learned in this site..
btw im new here..
thanks a lot and God Bless..October 20, 2010 at 2:28 am #48429Jiellen29Member
Great site here….Thank you for sharing some info….
Have a great day to all!!!December 7, 2010 at 10:29 pm #48430AtroposXMember
Thanks to Schoopy and his development vmware image, here is my step-by-step on being able to compile a driver from source…
#In VirtualBox, create a new machine, when asked to use an existing hard disk or create a new one, choose use an existing one, and point it to Schoopy’s development image, and boot as normal. Remember, to put all developer stuff on root of flash drive, glibc, gcc, static, your custom files, etc… Or alternatively use ftp to put the files on the /cdrom directory, rather than a usb flash drive. below will be for using a VirtualBox image, and a usb flash drive on the host machine.
#In the console, after fully booted, check to see what device the flash drive is.
#/dev/sda1 <- This is the USB Flash drive, "usually".
#Make a flash drive directory, “/mnt/”something””.
#Mount usb flash drive contents to /mnt/flash directory.
mount /dev/sda1 /mnt/flash
#Go to /cdrom
#Copy usb flash drive contents from /mnt/flash, to /cdrom
cp /mnt/flash/* /cdrom
#Expand the developer files and your custom ones too.
tar xvfj binutils-2.17-i386.tar.bz2
tar xvfj gcc-4.3.2-zs-i386.tar.bz2
tar xvfj gcc-include.tar.bz2
tar xvfj glibc-2.8-includes-zs.tar.bz2
tar xvfj static-lib.tar.bz2
tar xvfz custom.tar.gz
#Go into your custom directory that just got expanded.
#Run “make clean”, and “make all”, or how you need to compile your source.
#Hope this helps.December 9, 2010 at 3:04 pm #48431AtroposXMember
The developer image can be re-sized pretty easily as well to accommodate for larger space for building if needed.
You can also make a new blank VBox image in the size of say 50gigs or whatever you’d like, then in the VBox machine settings set the developer image as IDE and the blank image as SATA, and choose GParted-Live as the cd.
Boot from the GParted-Live CD, and choose the developer image as the device, and right-click and copy the farthest left partition, then choose the blank image as the device, and right-click in the unallocated space, and choose paste. Do this for each partition working your way right.
Then if needed, re-size the partitions to your liking, then click apply at the top, and wait a long time. It took quite a while to re-size the 4gig developer image to a 50gig image, making each of the partitions around 12gigs each, completely unnecessary I know, but just wanted to see if cloning/re-sizing the image would still boot, and it does.
- You must be logged in to reply to this topic.