Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Jul 2014, 23:55
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Boot from PCMCIA Compact Flash - alternatives?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [15 Posts]  
Author Message
dickieblack

Joined: 20 Aug 2008
Posts: 9

PostPosted: Fri 10 Oct 2008, 08:14    Post subject:  Boot from PCMCIA Compact Flash - alternatives?
Subject description: No BIOS support for CF boot - what other options do I have?
 

Hi,

I've been using Puppy for a few months and am extremely impressed, both with it's speed and feature set. It seem to be a very suitable OS for a netbook, once setup.

To this end, I have bought a Dell Latitude X1. This machine is fanless and has Compact Flash and SD Card slots, as well as a 1.8" hard disk.

My initial plan was to boot from the Compact Flash and us the HD only for storing large files, such as movies and photos, hoping that as the drive is not used at boot up it will spin down and preserve battery life.

Unfortunately, I have found that the machine cannot boot from the CF slot due to BIOS limitations. I am now looking for a way to boot initially from the HD and as soon as feasable switch to loading puppy from the CF.

I am not at all sure at which point this would be possible. I notice with Puppy 4.1 that PCMCIA support is loaded towards the end of the boot process. Can this be altered? Or can PCMCIA support be added to the initrd?

Any help, advice or pointers to reading material would be very much appreciated.

Richard
Back to top
View user's profile Send private message 
otropogo
Guest


PostPosted: Fri 10 Oct 2008, 09:44    Post subject: Re: Boot from PCMCIA Compact Flash - alternatives?
Subject description: No BIOS support for CF boot - what other options do I have?
 

dickieblack wrote:
... I notice with Puppy 4.1 that PCMCIA support is loaded towards the end of the boot process. Can this be altered? Or can PCMCIA support be added to the initrd?

Any help, advice or pointers to reading material would be very much appreciated.

Richard


You're not alone in looking for such a solution. We've been discussing this problem in the following thread and its predecessors, for some months now:


http://www.murga-linux.com/puppy/viewtopic.php?t=32458

We could use your input and feedback in that thread, as there are precious few active participants available to test the tentative solutions.

IIRC, Crash has reported some success in this direction. I haven't been so lucky.
Back to top
dickieblack

Joined: 20 Aug 2008
Posts: 9

PostPosted: Fri 10 Oct 2008, 17:37    Post subject:  

Thanks. That looks like quite long thread, but I'l have a good read and see where things are at.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4276

PostPosted: Fri 10 Oct 2008, 23:19    Post subject:  

I don't know exactly how your system is set up but this is what I would do to get it going.

1. Frugal install to CF, copy your menu.lst somewhere(>boot>grub>menu.lst)
2. Frugal install to HD, Grub in MBR
3. Edit your new menu.lst and replace this HD version with text from the CF version (or just add the menu section to it)
best option (if it works) = the whole CF version of menu.lst
2nd best = hd version but replace initrd and phome and pmedia options with CF version (in other words make it point to the CF) - this basically makes it load vmlinuz from the hd and everything else from CF - depending on if your CF is supported in the kernel or on modules you may have to keep initrd loading from the HD as well

if you still need help post the menu sections of your two menu.lst files
Back to top
View user's profile Send private message 
dickieblack

Joined: 20 Aug 2008
Posts: 9

PostPosted: Sat 11 Oct 2008, 05:58    Post subject:  

I did something similar to what you suggested. I am using syslinux as my MBR on a USD Flash Drive to boot puppy 4.1.

I did a frugal install to the CF, again with syslinux. I then added a section to the syslinux.cfg of my UFD to give me the option to boot from the CF. The section reads:

LABEL 1
KERNEL /pup410/vmlinuz
APPEND initrd=/pup410/initrd.gz nosmp pfix=pcmcia,ram ide=nodma

This works! I think... I am slightly confused, because on my UFD the puppy files reside in /pup410, along with vmlinuz and initrd.gz. Once initrd.gz is loaded, and the kernel boots, the activity light on my UFD stops and pup_410.sfs loads. Normally this is /pup410/pup_410.sfs, so I am fairly confident it is loading of the CF.

However, this process takes well over a minute instead of the usual 3-4 seconds. I thought a CF card would be at least as quick as the UFD.

Also, my SD card slot now works, but only if I do not save the session. Once saved, on the next reboot the device is not accessible - it simply does not show up in puppy.

And finally, the sessions do not seem to save properly. I get the option, and it points to the right device, but on reboot, the pup_save.2fs file is not present. (I know that the pfix=ram option bypasses save files - if this is not there puppy detects the saves on my UFD.)

More new questions than answers now, but at least I can load puppy from the CF! Time for some more testing!
Back to top
View user's profile Send private message 
dickieblack

Joined: 20 Aug 2008
Posts: 9

PostPosted: Sat 11 Oct 2008, 06:42    Post subject:  

Some more information:

The SD card seems to work permanently now. I loaded puppy from my UFD with pfix=ram and it showed up. When I shutdown, I created a new pup_save and on rebooting and loading this, the SD card still works. Must have been something in my previous session.

I have also discovered some more wierdness with my CF slot. When puppy boots with a card in the slot, pmount detects it as a floppy. When I add the card after boot, pmount detects it as a usb drive, like my UFD.

How can I find out what is causing this? In my mind, having the card in at boot is causing a different driver/module to be loaded, and this might be responsible for the extremely long boot time when booting from CF. Is this possible? Could the initrd be detecting the CF as a different class of device?

Also,, is there a way I can measure read performance of the CF card once booted, so I can compare it to my UFD and see if it really is slow? And see if not having it in the lost at boot makes it any faster?

Thanks,

Richard
Back to top
View user's profile Send private message 
dickieblack

Joined: 20 Aug 2008
Posts: 9

PostPosted: Sat 11 Oct 2008, 13:31    Post subject:  

Right, so a little bit more testing:

Copying the pup_410.sfs from the CF card to /mnt/ram1 takes 1m35s!

Copying the same file from the CF card in a usb card reader takes 35s. 3x faster, but still slow.

At boot, the "copying to ram" part takes 4-5 seconds.

I've also tested in WinXP and in another system running Puppy with different hardware and get similar results. I'm now thinking I've either got a slow CF card, or a dodgy one, but I have no others to compare it to.

Still, I can successfully boot from one device and load puppy files from another. Once I get a different CF card, I'll try the same thing with the internal HD and the CF card. (I'm not messing with the HD MBR yet)
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4276

PostPosted: Sat 11 Oct 2008, 14:23    Post subject:  

sounds like you are discovering the downside of CF drives

they are faster at loading many files due to virtually no seek time (such as in a traditional install)

however due to transfer speeds they are typically slower for large files (such as the SFS files in a frugal install)

this gets into read/write cycles of the CF device, wear leveling... and the fact that the flash oriented filesytems are not supported in puppy as far as I know (one alternative is using ext3 with the noatime option set - this prevents files from being rewritten every time they are read)

and yes the type of CF drive makes a big difference - speeds range from 40x to 350x (however over 266x you usually see no difference past their 40MB/sec due to other hardware issues - these are usually the best value for speed vs price) for example 4GB 266X at newegg for $14
Back to top
View user's profile Send private message 
pigshed

Joined: 23 May 2008
Posts: 198
Location: France

PostPosted: Sat 11 Oct 2008, 16:48    Post subject:  

Using a 16gb unbranded CF card - mounted in a CF/IDE converter in an old laptop. I ran several tests for boot and such like on comparison to a regular HD mounted in a near twin. Generally the CF was about 10% slower on boots (frugal) and between 10% and 20% slower in general usage.

Keep an eye on your boot times though, I think 4.1 needs about 3 boots before it reaches boot efficiency... If it does infuriate you, you could install it as a full install (which will be quicker for your configuration) - there's no reason why you can't full install a version you're happy with and still have several frugal's on the same machine in the same partition as the frugals just sit in their own directories.

I've been using the CF machine now for a few months as my main machine as it's silent.

Silent - as in permanently silent .. I did have problems with the fan not running when testing the 4.1 betas and did lots of temperature watching as my own nervous perspirations levels matched that of the CPU. Eventually I bottled it, and changed the config to use the fan. I shortly got bored of the fan after my pleasant silent times, did lots of research on CPU temperatures and have now fun fan free for about a month. I don't recommend trying it, you'll probably fry your machine. Mine's been fine though .. I regularly monitor the temperatures. It actually now runs cooler than it used to, I think I must have cooked the dust off some areas and improved cooling efficiency.
Back to top
View user's profile Send private message 
dickieblack

Joined: 20 Aug 2008
Posts: 9

PostPosted: Sun 12 Oct 2008, 04:51    Post subject:  

Thanks guys, very helpful. My CF card is a Sandisk Extreme 1GB. I guess I didn't do enough research before snapping it up for £5 on eBay - it apparently has a read speed of only 10MB/s, using a usb card reader. If that was what I was getting in my test, then I am getting only 3MB/s in the dedicated CF slot!

Oh well, you live and learn. Will check more thoroughly next time. How can I tell in puppy what sort of hardware the slot is? And if it is 32bit or 16bit? As I said, if the card is in at boot pmount thinks it is a floppy, if the card goes in later, it thinks it is a usb drive. Also, what difference might be caused by the ide=nodma at boot?

Re: the full install option being quicker - is that good for a flash drive? I thought the frugal installs were better because of the minimised writes?

And what file systems are best for flash drives? I was keeping with fat16 for now to retain compatibility with windows systems, but really that isn 't necessary, as once this works properly the drive will never leave the CF slot in the laptop.

Finally - laptop silence. The fanless Dell X1 I have could easily run silent once booted, as the hard disk could spin down after the initrd is loaded. However, it does not seem to be doing so. Is there some way to set the drive spin down time to 1 minute or something similar?

Thanks again,

Richard
Back to top
View user's profile Send private message 
mikeprotts

Joined: 04 Jan 2009
Posts: 5
Location: http://www.protts.uk.eu.org

PostPosted: Thu 26 Feb 2009, 09:10    Post subject:  

>Finally - laptop silence. The fanless Dell X1 I have could easily run silent once booted, as
>the hard disk could spin down after the initrd is loaded. However, it does not seem to be .
>doing so. Is there some way to set the drive spin down time to 1 minute or something
>similar?

hdparm will probably do this, look at -S, -y and -Y parms. Sometimes -Y seems to be a 'sleep until reboot', so sync before testing on your system.

I'm trying to get puppy to run of cf on my dell latitude c600 (hard disk runs long enough to boot, but overheats and stops), using a pcmcia cf adaptor, so this is my plan as well.

Cheers
Mike
Back to top
View user's profile Send private message Visit poster's website 
mikeprotts

Joined: 04 Jan 2009
Posts: 5
Location: http://www.protts.uk.eu.org

PostPosted: Thu 26 Feb 2009, 16:03    Post subject: CF - what is needed?  

I've run puppy from USB and CD, what do I need to get the initrd to see the pcmcia cf card at boot time?

Cheers
Mike
Back to top
View user's profile Send private message Visit poster's website 
mikeprotts

Joined: 04 Jan 2009
Posts: 5
Location: http://www.protts.uk.eu.org

PostPosted: Sat 28 Feb 2009, 16:33    Post subject: Changes to initrd.gz for pcmcia cf card  

I've made a couple of changed to initrd.gz, (specifically init). After the load of the yenta_socket module, I need pd6729 (copy from a running system) and the pcmcia-socket-startup from /sbin to run. The settings form the files in /lib/modules/2.6.25.16/ need to be copied for the relevant modules to load with modprobe.

So the steps are:
1) Install to a hard disk or CDROM
2) Save to CF card and setup grub/lilo etc for the CF card.
3) Issue lsmod and record this.
4) Try to boot to cfcard (it will fail)
5) Mount the pup file from the hard disk/cd
6) Look at any modules related to pcmcia and try to insmod them. After each, try pccardctl ident
7) once the card shows up use lsmod.
Cool Use partprobe/fdisk -l/dmesg to make sure
9) reboot to running puppy.
10) Use cpio to extract initrd.gz.
11) Change init
12) Use cpio to rebuild initrd.gz (needs to be somewhere permanent)
13) Try to boot using CF

Steps 4 to 13 will probably need to be repeated a few times Sad(.

Cheers
Mike
Back to top
View user's profile Send private message Visit poster's website 
rys61

Joined: 07 May 2009
Posts: 8

PostPosted: Mon 26 Oct 2009, 08:47    Post subject: Patch making 4.1.2 init find pcmcia compact flash in initrd  

The following patch if applied to init in initrd.gz configures the pcmcia sockets just as pcmcia-socket-startup normally does later when the system comes up fully.

A downside of this is that changes in /etc/pcmcia/config.opts are ignored as the configuration is hardcoded in the function pcmcia_socket_startup. Because of this pfix=pcmcia must be used to have this code run from initrd. It's also possible to use pfix=pcmcia1 for socket 1 only etc.

This patch makes it possible for me to boot from a cd (can't boot from pcmcia) and run from pcmcia compact flash adapter without any additional modules.

Ronny
init-4.1.2-pcmcia.patch.gz
Description  pcmcia init patch for 4.1.2
gz

 Download 
Filename  init-4.1.2-pcmcia.patch.gz 
Filesize  1.03 KB 
Downloaded  617 Time(s) 
Back to top
View user's profile Send private message 
sindi

Joined: 16 Aug 2009
Posts: 389

PostPosted: Tue 21 Jun 2011, 11:28    Post subject: Booting from live CD with save file on PCMCIA/CF
Subject description: Is there any puppy which can already do this?
 

Laptop hardware problems (reboot if it uses much power) preclude use of a hard drive but we have 4.31 booting from live CD and saving to USB flash drive. Attempted to use USB CF reader instead but it crashes half the time (as sda1). If we boot with the CF card in a non-cardbus PCMCIA CF adaptor, it is not recognized during boot, but shows up after booting as hde1, yet Puppy says there is no device we can save to.

We would prefer to use the PCMCIA slot for save file if possible so as to use the USB slot for other things (cameras, etc.) and do not want to spend money on a USB hub. Also we have several old CF cards. (And also a PCMCIA/IDE drive, also hde1 I think).

I do not know how to redo the live CD to make it see the CF/PCMCIA before boot, or to save to.

The laptop does not support pcmcia or USB boot. Circa 2002.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [15 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0937s ][ Queries: 13 (0.0043s) ][ GZIP on ]