You are not logged in.
I have the 900.
Tried your method of copying over files to the sd card and was only partially successful. Start button does not have the right icons, tabs are correct but icons missing for everything I had installed.
Why did this not work?
Now, I DID install Xandros on the sd card using a usb card reader and then copied the files when it was in the sd slot.
A lot seemed to be missing in the mounted sda2 - for instance "bin" folder was not there.
Having trouble with internet access - our satellite service is out so will not be able to check in very often here until it gets fixed. ![]()
Offline
Hope wrote:
I have the 900.
Tried your method of copying over files to the sd card and was only partially successful. Start button does not have the right icons, tabs are correct but icons missing for everything I had installed.
Why did this not work?
You new SD installation are properly automatically updating softwares from Asus. DISABLE THIS AUTO UPDATE FEATURE IMMEDIATELY. They are known to cause icon missing.
Hope wrote:
Now, I DID install Xandros on the sd card using a usb card reader and then copied the files when it was in the sd slot.
A lot seemed to be missing in the mounted sda2 - for instance "bin" folder was not there.
Do you mean missing in sdb2?
Since the unionfs overlay filesystems, there won't be every folder (as you have seen in File Manager) in sda2 (or sdb2). Only those you have modified will exist in the user partition (sda2 or sdb2).
Offline
Would this work.
Remove 80gig HDD.
Connect external DVD drive via USB
Insert 4gig sdhc card in slot.
Boot eeepc recovery DVD (xandros) and install to sdhc card.
Offline
zelig wrote:
Would this work.
Remove 80gig HDD.
Connect external DVD drive via USB
Insert 4gig sdhc card in slot.
Boot eeepc recovery DVD (xandros) and install to sdhc card.
The original bootscript of the recovery disk (whether DVD or USB) defaults install the revcovery image to sda. If you remove the 80 GB HDD, I am not sure if the SDHC will become sda or not. The SSD in my 4G is soldered, so I have not been able to test on this.
Even if you succeed to install the image to the SDHC like this, you still need to make it bootable from USB. You will need to do steps 6, 8, 10, 11, 12 as per the steps in A rewrite of the steps for Windows users - boot Xandros from USB on Eeepc.
Also, the built-in SD card slot is very slow. It will take about 30 mins to do this compared with about 5 mins with an external SD card reader.
Offline
Dear users of Boot Xandros from USB,
In the past 2 days, I have been testing on the problem reported by Hope and Romulo for EeePCs with 2 SSD and I have found different solutions. But each one has their pros and cons and I would like the users to decide which to implement.
The problem some people are facing now is that with a 2nd SSD the Xandros built on USB will also mount the HOME partition as /home, thus will share some files with the default Xandros on the 1st SSD. This may be preferred for some people. e.g. they don't need to configure firefox again, same firefox profile and local directories ...
But the problem arise when the user has disabled auto login and require to input password on his normal Xandros on 1st SSD. Then the Xandros built on USB cannot log in because password for this new installation has not yet been created.
One solution I have thought of is to change the default location of the .firstrundone file from /home/user to /root (in /usr/bin/startsimple.sh). Then the new system won't mistakenly take the old files from /home and will run the firstrunwizard to set passwords, etc. There seems to be no caveat on this. But the Xandros on USB and the normal one on 1st SSD are still sharing the same /home/user/.AsusLauncher/requireLogin file. So you can't have one installation require login and the other auto login.
Actually for me, I would prefer the 2 systems not to share the same /home to avoid troubles. And for this, I've found that we need to hexedit the file /sbin/fastinit to remove this line:
/bin/mount -onoatime -L HOME /home > /dev/null 2>&1
I have tested on this and confirmed that this can be done by the installation script.
So, pls give your opinions.
albkwan
Offline
@albkwan
I don't find any fault at all with how you have designed this method. I thank you for working so hard on it and it really works well. Don't change anything. The problem about the password is so minor; your fix for it worked great and took no time at all.
What I am having a problem with is trying to copy over my customized Xandros with many apps installed by me over to the sd card so that they WORK. So what I need is a method of copying over EVERYTHING from my old Xandros installation to my new sd card installation so that everything works exactly the same.
I used the method you described in this thread:
sudo mkdir /mnt/sda2 sudo mount /dev/sda2 /mnt/sda2
This left me with a Frankenstein where SOME customizations were moved over but none of my installs (Opera, Digikam, GoogleEarth, etc.) were working. When I tried to reinstall them all, most worked but I have some which gave installation errors.
I spent many many hours trying to get my headless gps to work on the Xandros and it was configured perfectly, but now on the sd card, it says that gpsd is installed but when I try to run it in the terminal it says it can't be found. Also, xgps is installed but gives the same error.
One error I got over and over again is:
E: msttcorefonts: subprocess post-installation script returned error exit status 2
Don't change anything! I am so grateful to you for writing this. I have installed Windows XP on the main 4 GB drive of my 900 so my husband is happy and I have the Xandros on the sd card to make me happy.
Need an easy way to backup the sd card though. Maybe I can try to figure out a way to use Acronis to do it....will puzzle that out later.
I DO need help with how to totally mirror the Xandros I originally had on my 4Gb eee drive though which was GREATLY customized.
I even had to go back and put entries into /etc/hosts and smb.conf to get my Windows netowrk to work which I should not have had to do if the copy procedure had worked.
Here's the error I just got while trying to install Digikam for the 6th time:
Reading package lists... Building dependency tree... Suggested packages: digikam-doc Recommended packages: digikamimageplugins The following NEW packages will be installed: digikam 0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded. 1 not fully installed or removed. Need to get 4316kB of archives. After unpacking 10.3MB of additional disk space will be used. WARNING: The following packages cannot be authenticated! digikam Get:1 http://xnv4.xandros.com etch/main digikam 2:0.8.2-4 [4316kB] debconf: Perl may be unconfigured (Can't locate warnings/register.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/perl/5.8/vars.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl/5.8/vars.pm line 7. Compilation failed in require at /usr/share/perl/5.8/File/Spec.pm line 4. BEGIN failed--compilation aborted at /usr/share/perl/5.8/File/Spec.pm line 4. Compilation failed in require at /usr/lib/perl/5.8/IO/File.pm line 12. BEGIN failed--compilation aborted at /usr/lib/perl/5.8/IO/File.pm line 12. Compilation failed in require at /usr/share/perl/5.8/FileHandle.pm line 9. Compilation failed in require at (eval 1) line 3. BEGIN failed--compilation aborted at (eval 1) line 3. ) -- aborting Fetched 4316kB in 53s (80.5kB/s) (Reading database ... 76010 files and directories currently installed.) Unpacking digikam (from .../digikam_2%3a0.8.2-4_i386.deb) ... Setting up msttcorefonts (1.8) ... Can't locate warnings/register.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/perl/5.8/vars.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl/5.8/vars.pm line 7. Compilation failed in require at /usr/share/perl/5.8/base.pm line 4. BEGIN failed--compilation aborted at /usr/share/perl/5.8/base.pm line 4. Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Log.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7. Compilation failed in require at /usr/share/debconf/frontend line 6. BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6. dpkg: error processing msttcorefonts (--configure): subprocess post-installation script returned error exit status 2 Setting up digikam (0.8.2-4) ... Errors were encountered while processing: msttcorefonts E: Sub-process /usr/bin/dpkg returned an error code (1) ---- An error occured during the DigiKam install. Check the Live Shell Feed for the error message, or ask the users on eeeuser forums for help with the error.
Can you help me with some of these problems? Did I not follow the copy procedure correclty? Help! I'm so close...
Offline
Hope,
What I can think of is either you are missing some of the hidden files (those start with ,xxx) when you copy them or you need to run a filesystem check on your SD. You really need a good quality SD to run default Xandros on it!
Nice to hear the good comments from you.
Cheers
albkwan
P.S. The new variation to install default Xandros to the 2nd SSD will come out very soon. I am sure you will be glad to have this alternative.
Offline
@albkwan
My SD card seems to be excellent. The speed of Xandros is almost the same as when I had it installed on the 4 GB partition. It seems I did not copy the correct files over or it miscopied files is why I had all my installed apps go missing. This does not explain why the originally installed gpsd and xgps don't work, though.
Hope you don't mind some very basic questions?
I am totally confused about the structure of the original Xandros partition system and the partition system on the new albkwan-sd card.
First of all, There were 2 main partitions on the 4 GB drive and 2 small ones on that drive. Then there is the 16GB SSD card, right?
When I am booted into the original Xandros partition with the albkwan-sd card in the media card slot in the EEE, what are the NAMES of the partitions and exactly what partition do I copy over to WHAT partition to get a mirror copy of my customized installation (all kinds of apps, wallpaper, tab setup, etc.) onto the albkwan-sd card?
There's sda2, sdc, sdb...whatever...I'm totally confused with the naming of these partitions and THEN you have drive D: and drive E: to add into the mix. On my albkwan-sd card, when installs fail, it often mentions drive E:. Is that the albkwan-sd card card??
Also, what are the benefits and the downside of getting rid of the unionfs system? I know I would not be able to do f9 to get the original config back, but, on the up side, would I then be able to use the 16GB ssd card in Windows XP for apps or storage? What would happen to all the Xandros files on the ssd card.../home/user/My Documents for instance? Would I essentially have just a totally self-contained Xandros on the albkwan-sd card with none of its files on the 16 GB ssd card (unless I threw something on there like music files)?
Another question...any way to use the 16GB card in my multi boot situation with both Xandros and XP if I DON'T remove unionfs?? It is only recognized now in the albkwan-sd card Xandros mode because of its type of format, I guess.
Heh, should I throw in the question of Advanced mode??? I would LOVE to also have Advanced Mode back as an option. Guess I can't have my cake and eat it too, right?
Offline
Hope,
If I didn't get you wrong. You have a 20G 900 model with 2 SSD: 1st SSD 4G with original Xandros (sda1 SYSTEM partition and sda2 USER partition), and 2nd SSD 16G with the HOME partition (sdb1). So, the SD card in the build-in card slot should be sdc, i.e. sdc1 = SYSTEM partition of Xandros on SD, and sdc2 = USER partition of Xandros on SD.
So you should be copying the files from the USER partition of the original Xandros (i.e. sda2) to USER partition of Xandros on SD (i.e. sdc2).
This drive letter game with the latest version of usbstorageapplet is annoying. You need to guess which is which by looking into the output from the following commands:
mount df -h
When I have time, I will proceed to modify this annoying usbstorageapplet.
Hope wrote:
Also, what are the benefits and the downside of getting rid of the unionfs system? I know I would not be able to do f9 to get the original config back, but, on the up side, would I then be able to use the 16GB ssd card in Windows XP for apps or storage?
The 16GB SSD has nothing to do with or without union filesystem. By default, Xandros (for 900) will mount any partition with volume label HOME to /home. And 900 defaults come with a HOME partition in the 2nd SSD.
But this can be easily changed by editing the /sbin/fastinit file. Without this HOME partition mounted in /home, then Xandros on SD will become a self-contained system.
Hope wrote:
Another question...any way to use the 16GB card in my multi boot situation with both Xandros and XP if I DON'T remove unionfs?? It is only recognized now in the albkwan-sd card Xandros mode because of its type of format, I guess.
To make this partition visible to both winxp and Xandros, it should be in a format both system can read/write to it. FAT32 is a better choice.
Hope wrote:
Heh, should I throw in the question of Advanced mode??? I would LOVE to also have Advanced Mode back as an option. Guess I can't have my cake and eat it too, right?
Why not use the icewm start menu? I have an easy script to enable this.
Offline
Thanks for taking the time to answer my questions. I appreciate it.
I already have the start button enabled in Easy Mode. It's just that I liked the appearance and some of the features of the Advanced Desktop. (I'm easily amused...I liked the slideshow desktop and being able to have a tab-less environment with just a few icons...nothing I can't live without.)
The only problem I have now is the GPS software not working at all. Gpsd and XGPS show they are INSTALLED but will not execute from the command line. Any ideas?
I have not tried printing over the network yet either.
I deleted Windows XP temporarily (did an Acronis backup so I can restore it) and went back to my original Xandros Easy Mode/Advanced Mode setup and my GPS works great in that setup just does not work from the albkwan-sd card card environment because gpsd and xgps don't work.
Maybe at some future date I will redo the entire procedure to see if something went wrong in the initial writing of the Xandros files to the sd card...don't have the energy right now to tackle that. Are you sure gspd and xgps weren't somehow left out when you created your setup files? Do those work on your sd card?
I found that Digikam works even though there were errors when I reinstalled it so "I think" that everything works except my GPS.
Offline
Hope wrote:
The only problem I have now is the GPS software not working at all. Gpsd and XGPS show they are INSTALLED but will not execute from the command line. Any ideas?
Sorry! Can't help on this. Next play with GPS before.
Offline
@albkwan
Got everything fixed, I think....something always pops up when you try to use it a week after the changes and surprises you. :-)
BUT, I made a mistake and copied the contents of the /usr folder onto Disk E: (which appeared to be the location of user files on the sd card) while I was in Advanced Mode and then when I booted up from the sd card I got the Advanced Mode desktop! Oh, well, now everything works INCLUDING, my gps and Roadnav, networking to my Windows desktop, printing to my Windows desktop, Opera, Digikam, etc. Everything I had installed on my customized Xandros.
The ONLY problem is that I can't shutdown AD gracefully. The shutdown dialog appears and when you click on restart or shutdown it shows it received the click but it won't shut down. So I have to do a hard shutdown. No big deal, I guess, but I will try to troubleshoot it to fix it.
Then I reinstalled my Windows XP full version with sp3 slipstreamed Acronis backup to the 4 GB space on the EEE and it booted right up.
I think I originally copied the wrong files to the wrong place the first time because these partitions are very confusing.
Off to get my flu shot...
Thanks, albkwan.
Last edited by Hope (2008-10-03 10:12:00 am)
Offline
Hope wrote:
he ONLY problem is that I can't shutdown AD gracefully. The shutdown dialog appears and when you click on restart or shutdown it shows it received the click but it won't shut down. So I have to do a hard shutdown. No big deal, I guess, but I will try to troubleshoot it to fix it.
No, you should fix this. Other people who have the Advanced Desktop on USB has reported this situation and eventually they have filesystem errors that corrupt the Xandros on USB and they need to reinstall again.
What I would suggest is to config Advanced Desktop to shutdown with the script /sbin/fastshutdown.sh. This script should be safe. But since I never use the Advanced Desktop on the EeePC, I cannot tell you what exactly to do.
Offline
The script /sbin/fastshutdown.sh does nothing on my sd card system at all except close the network and cause the inability to access the terminal or any apps. It doesn't initiate shutdown.
I checked the content of it and it seems to have the standard content.
Will continue to try to puzzle it out.
Offline
Basically there are 2 commands in the script /sbin/fastshutdown.sh:
/usr/bin/killall --wait usbstorageapplet
/bin/kill -USR2 1
The 1st command kills the process "usbstorageapplet" but wait for the process to die before it kills it. [NB. This may be the reason why the EeePC sometimes take long time to shutdown.]
The 2nd command kills the process with pid=1, i.e. fastinit. So it should shut down everything. In easy mode, this works good. May be you can check what is pid 1 in Advanced Mode. Try to run a "ps -A" to list running processes. Also, are you running this as root?
Offline
Hi albkwan,
Just got my 1000H with XP preinstalled. Thanks for your instruction for booting Xandros from SDHC.
I've successfully followed your procedure and can boot from SD with WiFi etc working except..for on problem.
Running Windows XP, my C: drive (39.9 GB / 30.8 GB free) is installed with XP and my D: drive is for data (258 GB) - I installed a 320 GB Seagate SATA HDD and upgraded to 2GM RAM. I formatted the Partitions as NTFS. Data drive D: is currently empty i.e. 258GB free
Booting up from Xandros from a 4GB SDHC card inserted into the built-in card reader, Disk Utility shows Total Disk space 305245, Used: 304805, Available 400MB. File Manager does not seem to show and HDD . My Home has; Bluetooth Exchange Folder, My Documents, Pictures,Trash, Videos
The other My Eee PC items are; Printers, Windows Network and NFS Network. I can access Windows Network and read /write to and from my network computers (windows XP based with NTFS HDD)
Question:
How can I assess the D: data drive when running Xandrox. It would be a waste of all the free HDD if I can't.
Any ideas?
Offline
rickhan wrote:
How can I assess the D: data drive when running Xandrox. It would be a waste of all the free HDD if I can't.
Hi Rickhan,
This is not a problem specific to USB boot, but default Xandros is only programmed to automatically mount the root partition, HOME partition and USB drives. You have to instruct it how to mount the D: data drive with a terminal command something like:
sudo mount -t [Filesystem Type] [Device Name] [Mounting Point]
- The "Device Name" for your D: data drive is probably "/dev/sda2". You can check what partitions the kernel that detected with the command "cat /proc/partitions"
- "Mounting point" is any folder you select, e.g. "/home/DATA/"
- As my EeePC is now under internal modification, I cannot check the correct "Filesystem Type" to specify for mounting ntfs drives. May be someone else can help here.
To make this permanent, you can add this command to the file /usr/sbin/services.sh or /etc/fastservices. There are some other threads talking on this. You can search the forum to see what others have done.
albkwan
Offline
Thanks for the tips albkwan! As this helps me a lot. Although I find learning Linux very tough and every step to do something simple, you have to spend hours of research just to do it. Sure wish I got into Linux back in '92, as maybe it would be easier by now. Although I was too busy with DOS, CP/M, and GEOS back then too. Now look at them! :-(
Offline
Thanks albkwan
I am new to linux but have handled DOS and Win.
After your suggestion, I created folder in D: drive under Win and named it linux.
BTW my D: drive is labeled ASUS_DATA and C: drive is labeled ASUS_APPS
The I checked the web for "How to mount ntfs" and from this site http://www.swerdna.net.au/linhowtontfs.html#locate I gathered that I should use /dev/sda5 and ntfs-3g
then from you reply and the information from the web I did and got the following:
home/user> sudo fdisk -l
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5220 41929618+ 7 HPFS/NTFS
/dev/sda2 5221 38913 270639022+ 5 Extended
/dev/sda5 5221 38913 270638991 7 HPFS/NTFS
/home/user> sudo mount -t ntfs-3g /dev/sda5 /linux
mount: mount point /linux does not exist
/home/user>
Please suggest what I'm doing wrong. Thanks
Offline
rickhan wrote:
I created folder in D: drive under Win and named it linux.
BTW my D: drive is labeled ASUS_DATA and C: drive is labeled ASUS_APPS
The I checked the web for "How to mount ntfs" and from this site http://www.swerdna.net.au/linhowtontfs.html#locate I gathered that I should use /dev/sda5 and ntfs-3g
then from you reply and the information from the web I did and got the following:
...
/home/user> sudo mount -t ntfs-3g /dev/sda5 /linux
mount: mount point /linux does not exist
/home/user>
Please suggest what I'm doing wrong. Thanks
1) The mounting point should exist in a filesystem that is already mounted. If it is in your D: but D: has not yet been mounted, how can the system mount the drive to a folder it is not accessible?
You can create the folder "linux" in "My Home" after you boot up your Xandros in USB with default File Manager. Then the mounting point in above command should be /home/user/linux.
2) The default Xandros of the EeePC is not using ntfs-3g for mounting NTFS drives. It should be ufsd. See this page for details: http://free.ntfs-linux.com/options.htm
Offline
Great! Many thanks albkwan, it works! ![]()
I used
mount -t ufsd -o fmask=0777,dmask=0777 /dev/sd5 /home/user/linux
now I can read/write to my D: drive.
Offline
Hello
I've created a script from your wik to automate creation of the SD Card.
It's alpha, not yet tested, but may you have a look at this ?
I fear that I've made some mistakes, particulary on steps in your wiki that references "sdb" (9 and above) that I understand it stands for "sdX"
Here it is :
#!/bin/bash
if [ $# -ne 2 ]
then
usage();
exit
fi
if [ "$1" -eq "901" ] || [ "$2" -eq "701" ]; then
usage();
exit
fi
function usage() {
echo "Usage: `basename $0` <EEEPCModel=901|701> <TargetDriveToInstall>"
echo "Where : "
echo " * EEPCModel : if Xandros is intended to be used on EEEPC 901 ou 1000H, use 901 ; otherwise use 701";
echo " * TargetDriveToInstall : Tells the drive where Xandros will be installed on ; Example : sdd";
exit
}
echo "Ready to Install Xandros on SD Drive /dev/$2, for a $1 EEEPC Model";
echo "Are your sure about this ? (y/n)";
read SURE;
if ["$SURE" -neq "y"] then
echo "Aborting !"
exit;
fi
if [ "$1" == "901" ]; then
#Réglage 901 et 1000H :
export SD_DRIVE=sdc
else
#Réglage 701 :
export SD_DRIVE=sdb
fi
export INSTALL_DRIVE=$2
export INSTALL_DRIVE1=`echo "$INSTALL_DRIVE"1`
export INSTALL_DRIVE2=`echo "$INSTALL_DRIVE"2`
sudo -i
mkdir xandros
for dDev in `mount | grep $INSTALL_DRIVE | awk '{print $1'}`
do
umount $dDev
done
mount -o loop ../ISO/eeepc901_xandros.iso xandros
cat .
#format first partition of target SD Drive if needed and then extract MBR and SYSTEM partition onto
mkfs.ext2 /dev/$INSTALL_DRIVE1 2>/dev/null
gunzip -c xandros/P701L.gz | dd of=/dev/$INSTALL_DRIVE
#Fdisk to create new primary partition (1Go) on target SD Drive
fdisk /dev/$INSTALL_DRIVE << EOF
n
p
2
401
+1024M
w
EOF
# Format new partition /dev/sdX2 to ext3 filesystem:
mkfs.ext2 /dev/$INSTALL_DRIVE2
tune2fs -j /dev/$INSTALL_DRIVE2
e2label /dev/$INSTALL_DRIVE2 USER
# Mount /dev/sdX1, create a temp dir in /boot, and unpack the initramfs image there:
mkdir $SD_DRIVE
mount -t ext2 /dev/$INSTALL_DRIVE1 $SD_DRIVE
mkdir $SD_DRIVE/boot/temp
cd $SD_DRIVE/boot/temp
gunzip < ../initramfs-eeepc.img | cpio -i
cd ../../..
# Copying the needed kernel modules from the root drive of our new SD card/USB stick into our custom kernel image
cp $SD_DRIVE/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/storage/libusual.ko $SD_DRIVE/boot/temp/modules
cp $SD_DRIVE/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/storage/usb-storage.ko $SD_DRIVE/boot/temp/modules
cp $SD_DRIVE/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/host/ehci-hcd.ko $SD_DRIVE/boot/temp/modules
cp $SD_DRIVE/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/host/uhci-hcd.ko $SD_DRIVE/boot/temp/modules
cp $SD_DRIVE/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/core/usbcore.ko $SD_DRIVE/boot/temp/modules
# Backup the file "init", and modify to load USB modules at bootup:
cp $SD_DRIVE/boot/temp/init{,.ori}
sed 's/sda/'$SD_DRIVE'/g' $SD_DRIVE/boot/temp/init > tmpfile && mv tmpfile $SD_DRIVE/boot/temp/init
head -n1 $SD_DRIVE/boot/temp/init > init
echo "
#load USB modules - this won't work unless you have
#copied them into the image
echo loading USB modules
insmod -f /modules/usbcore.ko
insmod -f /modules/ehci-hcd.ko
insmod -f /modules/uhci-hcd.ko
insmod -f /modules/libusual.ko
insmod -f /modules/usb-storage.ko
#Need time to register things. Depending on the speed of your SD card/USB stick, you may need/want to adjust your sleep time longer or shorter.
sleep 6
">>init
tail -$((`cat $SD_DRIVE/boot/temp/init|wc -l`-1)) $SD_DRIVE/boot/temp/init >> init
cp init $SD_DRIVE/boot/temp/init
#Create device sdb1 and sdb2 in /dev of the temp dir:
cd $SD_DRIVE/boot/temp/dev
mknod -m 644 sdb1 b 8 17
mknod -m 660 sdb2 b 8 18
mknod -m 644 sdc1 b 8 33
mknod -m 660 sdc2 b 8 34
cd -
# Now pack the initramfs image:
cd $SD_DRIVE/boot/temp
find | cpio -H newc -o | gzip -9 > ../initramfs-usb-eeepc.img
cd -
# Backing up & Edit the file scanuser.sh:
cp $SD_DRIVE/sbin/scanuser.sh{,.ori}
sed 's:/dev/sda2:/dev/'$SD_DRIVE'2:g' $SD_DRIVE/sbin/scanuser.sh > tmpfile & mv tmpfile $SD_DRIVE/sbin/scanuser.sh
# Backing up & Edit the file formatuser.sh:
cp $SD_DRIVE/sbin/formatuser.sh{,.ori}
sed 's:/dev/sda2:/dev/'$SD_DRIVE'2:g' $SD_DRIVE/sbin/formatuser.sh > tmpfile & mv tmpfile $SD_DRIVE/sbin/formatuser.sh
# Edit the file /usr/sbin/services.sh (Optional):
cp $SD_DRIVE/usr/sbin/services.sh{,.ori}
sed 's/modprobe uhci-hcd/#modprobe uhci-hcd/' $SD_DRIVE/usr/sbin/services.sh > tmpfile
sed 's/modprobe uhci-hcd/#modprobe uhci-hcd/' tmpfile > tmpfile2
sed 's/modprobe usb-storage/#modprobe usb-storage/' tmpfile2 > tmpfile
rm tmpfile2 & mv tmpfile $SD_DRIVE/usr/sbin/services.sh
# Edit grub boot menu to change root to /dev/sdb1:
cp $SD_DRIVE/boot/grub/menu.lst{,.ori}
cp $SD_DRIVE/boot/grub/menu.lst{.ori,}
sed 's/root (0x80,0)/root (hd0,0)/' $SD_DRIVE/boot/grub/menu.lst > tmpfile
sed 's:root=/dev/sda1:root=/dev/'$SD_DRIVE'1:' tmpfile > tmpfile2
sed 's:initramfs-eeepc.img:initramfs-usb-eeepc.img:' tmpfile2 > tmpfile
rm tmpfile2 & mv tmpfile $SD_DRIVE/boot/grub/menu.lst
# The End :
echo " Reboot. Press [Esc] at startup and select 'USB: USB2.0 Card Reader SD0' as first boot device."Thanks !
Last edited by demzed (2008-11-16 7:30:51 am)
Offline
And, to end, does anybody found a suitable idea to the password pb ?
Thanks
Offline
Hi demzed,
This is an interesting script. Actually this is something I plan to do for Mount SD card as part of the unionfs but never found the time to do it.
Have a quite look at your script. Some points I have noted:
1) The if clause for checking 901 or 701 seems to be wrong, it should be else usage()
2) You don't need to format first partition of target SD drive. A complete filesystem for the SYSTEM partition is included in the P701L image.
3) For fdisk to create USER partition, user partition for 701 and 900 models start at 301 (instead of 401) and I don't know about the 2G surf model (should be even less). Also, +1024M may be too small for the USER partition.
4) In case you are still using default Xandros in sda1/sda2, it is better to use a different volume label for the USER partition on the SD. [NB. In this case, you should also change this in /sbin/formatuser.sh]
5) The step to edit /usr/sbin/services.sh is not necessary.
demzed wrote:
And, to end, does anybody found a suitable idea to the password pb ?
There are quite a no of solution to this depending on whether you want to keep sdb1 as HOME partition or not.
CASE 1: If you are not going to keep sdb1 as HOME partition (which is what I prefer), then you should edit the hex file /sbin/fastinit to remove the line for mounting sdb1 as /home
sed -i 's@/bin/mount -onoatime -L HOME /home > /dev/null 2>&1@ @' /sbin/fastinit
Then the problem will be solved automatically.
CASE 2: If you want to keep sdb1 mounted as HOME partition, then the easiest solution I have figured out is to change the default location of /home/user/.firstrundone to /root. Then when the SD Xandros boot up, it will automatically run the first run wizard and set up everything as usual. I have forgotten where we set this. I have to look into my notes. Will revert later.
EDIT: I've found it. It is in /usr/bin/startsimple.sh
albkwan
Last edited by albkwan (2008-11-18 6:53:18 am)
Offline
Thanks for your corrections albkwan ![]()
albkwan wrote:
Have a quite look at your script. Some points I have noted:
1) The if clause for checking 901 or 701 seems to be wrong, it should be else usage()
Right
albkwan wrote:
2) You don't need to format first partition of target SD drive. A complete filesystem for the SYSTEM partition is included in the P701L image.
Exact, I've added this to avoid some strange behaviours when reusing the same usb stick for multiple operations (I had one time files that were listed, but did not exists anymore), but it was only for dev issues.
albkwan wrote:
3) For fdisk to create USER partition, user partition for 701 and 900 models start at 301 (instead of 401) and I don't know about the 2G surf model (should be even less). Also, +1024M may be too small for the USER partition.
In fact, will this USER partition really necessary when booting from SD card ? Would'nt people prefer using SSD or HDD ?
This solution may then make things simpler if, in future, more O/S are installed on this SD card.
albkwan wrote:
4) In case you are still using default Xandros in sda1/sda2, it is better to use a different volume label for the USER partition on the SD. [NB. In this case, you should also change this in /sbin/formatuser.sh]
Right, in this case, can I call them SYSTEM_SD & USER_SD (if used) ?
Any contraindications ?
albkwan wrote:
5) The step to edit /usr/sbin/services.sh is not necessary.
Really ? i'll drop it then
albkwan wrote:
demzed wrote:
And, to end, does anybody found a suitable idea to the password pb ?
There are quite a no of solution to this depending on whether you want to keep sdb1 as HOME partition or not.
I think that, in this specfic case, using the same partition on the SD card for both system & home is simplier and safer. I'll shall then only implement the CASE 1
albkwan wrote:
CASE 1: If you are not going to keep sdb1 as HOME partition (which is what I prefer), then you should edit the hex file /sbin/fastinit to remove the line for mounting sdb1 as /home
Code:
sed -i 's@/bin/mount -onoatime -L HOME /home > /dev/null 2>&1@ @' /sbin/fastinitThen the problem will be solved automatically.
Thanks again, see you soon ![]()
Last edited by demzed (2008-11-17 2:40:08 pm)
Offline