Using DSL for an LCD Picture-Frame project


Forum: Other Help Topics
Topic: Using DSL for an LCD Picture-Frame project
started by: cgp3389

Posted by cgp3389 on Oct. 11 2004,20:21
Hi,

Background-
I recently spent a considerable amount of time scanning in over 700 slides that my father had taken since the 1960's.  Of those slides about 600 of them are still in pretty good condition and are now stored in high-res on DVD.

The idea-
I have several older laptops (i486-66 up to P3-700) and was thinking that I would like to take one of them appart and  build one of those LCD Picture Frame things for my parents as a Christmas present and fill it with slides and photos I've scanned.

I considered using a hard-drive install of MS-Windows and placing the images on a CD mainly because that would be easiest for me.  But as I started to think more about it, I decided that using a CD instead of a hard-disk would be better in the long run because hard-drives are noisy and they do fail eventually and I want this thing to last.  

So my personal requirements for this project will be:  Pentium 266 Laptop ( that works wonderfully with the default DSL CD) with 32MB of RAM and a CD-Rom drive.  No Floppy Drive or Hard Drive in the final product.  It may contain a PCMCIA network card.  Probably a network card because my parents have likely forgotten half the slides they have and may want to retrieve photos from it for printing later.

So what I would like help with is:

I've just discovered this distro of DSL and it appears to contain everything I need.  I believe I read somewhere that XV ( or xzgv ) can be used to run a slideshow using a script. Is there a better tool for this?  Everything I have read about so far requires and X server.

As I am just now starting to learn about DSL, I would appreciate some direct help or maybe some links to references that would help speed up the learning process for me.  Christmas is just around the corner and I have a lot of work to do if this is to be finished by Christmas.

I am a newbie to Linux, I have spent the past 9 years in the Microsoft Windows camp.  I have discovered Linux, I love it and I am starting to use it more and more. "There is still hope for me." There is just so much to learn and I would like to cut down on experimenting as much as possible because of time constraints.

My imediate need-to-knows:

Building/Editing the main ISO?  What tools to do that under Linux or Windows ( I run SUSE 9.1 on a few pc's and Win2k on a few others)

How do change DSL so that it will boot with no-prompts including login and run xmms or xv or xzgv in a command line mode with a script? ( There won't be a keyboard or pointing device once this is assembled )

I figured the best way to do this would be to integrate the 500+ MB of images I want to use in the slideshow, in to the bootable DSL image.  Or, should I try to make separate partitions on the CD for DSL and the Slides and mount the slide partition after DSL loads.  What do you think would be the best way?

I suffer from over-analysis paralisys... please help!

-Chris

Posted by cbagger01 on Oct. 11 2004,21:10
Sounds like an interesting project.

I think that you may be better off using a large Compact Flash memory card (512MB or more) and a CF IDE adaptor.

It will behave like a hard drive, except DO NOT USE IT FOR FREQUENT WRITING like a swap file or you will destroy it.  It is great for almost unlimited reads, has no moving parts, and is perfectly quiet.

So do a frugal install on to a CF / IDE card , or buy one from the Damnsmalllinux store and they will ship it to you.

Good Luck.

Posted by skaos on Oct. 12 2004,10:11
Just a small comment: is that P266 able to display 16 or 24 bit colour? - 8 bit colour doesn't work well with photos.
Posted by AwPhuch on Oct. 12 2004,15:07
I did a < GOOGLE > search for  xzgv slideshow script and found
< http://www.goosee.com/puppy/dforum/forum.cgi?msg=402 >
< http://nebel.gmxhome.de/tkalbum/README.html >

This might be of interest to you
< http://www.medcosm.com/pictureframe.html > <---this one even mentions DSL!!!!
and < http://kavlon.org/index.php/xvslide >


Perhaps this and a livecd burned will allow you to run this...

Hope that helped

Brian
AwPhuch

Posted by clivesay on Oct. 12 2004,16:00
Brian -

I just finished reading about that same project!  :)  I need to check it out.

Chris

Posted by cgp3389 on Oct. 12 2004,16:24
Yes, the laptop will display 16 and 24 bit color depth but max resolution for the panel is 800x600 so I will have to scale the pictures.  I am going to make scaled copies of the original scans at a lower resolution in jpeg format instead of the original tiff in order to save space on the final CD. The laptop is a Compaq Armada 7700 (and its a 233mhz processor not a 266 like I said earlier)

As far as using a CF memory card, I don't have any large enough for this and one of the side benefits of doing it with a CD is that It will be one less laptop and cd-rom drive in my collection. I plan to leave the drive exposed in the enclosure so that I can just send the folks a new CD once in a while.

Right now I need to figure out how to get my pictures on the CD with DSL and get dsl to load without prompts of any kind.  As I said, DSL didn't require any special choices during load from the ISO I got.  Just pressed enter when asked to log in and selected 0 (for the 80x25 line option) when asked about video.

I've been reading the documentaion that I can find but I am not too familiar with working with isofs.  I don't know where/how to make the changes I need.  Last night I ftp'd the /home/dsl directory from the ram drive to another pc so i could look at the xinit and bash stuff.  

If I make changes to the files and recreate /home/dsl on the root of the CD will it be used instead of the /home/dsl that is unpacked (from somewhere) in to the ram-disk?  The readme file talks about backing up and restoring settings.  I need to learn more about this.

I am working with DSL on the laptop that I intend to use for the project.  There is no floppy to backup to.  I have tried a few hard drives but for some reason I can't get DSL to see it.

I would prefer to do the remastering work on a win2k pc since they are the ones with the CD burning hardware.  I use CDRWin (www.goldenhawk.com) because I am a control freak. I don't mind creating the remastered iso on a Linux pc but I have no idea what I am doing yet...

Right now I am trying to grasp exactly what is going on when the DSL cd boots.  Is that 49mb Knoppix file an iso?  Is that where the ram-drive gets its directory structure?  Would it be possible to copy all the files from the DSL CD to a Windows based pc and make my changes and add my slides there and then recreate the iso and create a new disk using the boot-0.8.0.img from the DSL files site as boot sector image for the new bootable CD?

I know I can do this whole thing quite easily (except maybe the whole ftp or http access part ) using DOS and some freeware slide programs.  But where's the fun in that!?

I think DSL is great, I am definitely going to continue to use this after my slide viewer is done.

Posted by nomasteryoda on Oct. 14 2004,16:14
Brian,

Check out my site < http://nomasteryoda.blogspot.com > or my LUG site then click my head (blue one) - < http://mgalug.org > - or google for nomasteryoda.

I found several Datalux PCs with 12.1" LCD screens... 2 of which worked. I installed DSL 0.8.1 on one of them ...
i used feh to do the display slideshow... small and fast - and used synaptic to do the install. I can remotely upload images to it and start/stop the slideshow or reboot the system from anywhere.

... complete directions on my site...

I would recommend resizing the images down between 72-96dpi @ 1024x768 resolution for the laptop you are using... GIMP works well for this purpose... The reason? It sounds like you are working with a slow system with limited video ram.

Otherwise, very nice idea

nomasteryoda - out
email me if you have a question < jeff at mgalug dot org >
or drop by our IRC in the evenings after 5pm EST <
irc.freenode.net #mgalug >

Posted by nomasteryoda on Oct. 14 2004,16:29
Sry, didn't see the part that you have only 800x600... i resized my pics down to that level ... but feh will scale them for you if you want

Also... having a HD adapter cable helps... I use a 80 to 40 IDE adapter to connect my Laptop HD to my desktop system ... Since the Datalux PC only has serial / parallel / PCMCIA and no Floppy or CDrom drives I had to do it this way. But of course, DSL has excellent auto-detection of devices so moving the HD from one system to another was absolutely no problem. I did choose to use 0.8.1 due to some error when trying to boot using 0.8.2...

good luck,

nomasteryoda - out
(Yes, the unregistered post under nomasteryoda is mine)

Posted by irun5k on Oct. 15 2004,19:16
Check out my EPIA 5000, DSL based frame.

< http://tinyurl.com/4dv9p >

I highly recommend feh as a slideshow for its command line options.  Available via apt-get.  Also, grab unclutter with apt-get to hide the mouse cursor.

I also use a kernel mod "powerswitch.o" for a clean "shutdown -h now" on an atx power button press.  I compiled it for the last .7x? (I think) release of DSL.

Posted by ericschrauth on Oct. 26 2004,01:56
irun5k,

What source did you use for the lcd screen?

Posted by Rapidweather on Oct. 28 2004,01:59
(This is going to be rather mundane compared to the other posts)
I needed to transfer a picture gallery from my DSL CD (remastered) to an
XP machine, for use as images to paint. View the image in XP, draw and watercolor until it looks right. (not me, my daughter's idea)
So, I booted up the DSL CD (0.6.2) on her Dell, and tried to copy them to a folder in the XP partition. No luck. Then I used a memory stick (pen drive), and copied them to that, then rebooted into XP, and copied them (30 images) from the pen drive into the target folder in XP.
---
I had one 256 MB linux-formatted pen drive, and that could not be seen by XP, so had to use a 64 MB fat-formatted pen drive. That worked fine.
Tried to reformat the 256 in XP to fat, then I could not get it to work in DSL.  ???

Posted by AwPhuch on Oct. 28 2004,03:59
M$ products cant see a ext2 or ext3 linux partition

However Linux can see and rw to fat32 and read ntfs

Thats why its best to format all pendrives and usb harddrives (those used to transfer files and whatnot) in the fat32 format

Do you have a win98se OS anywhere?

Brian
AwPhuch

Posted by ke4nt1 on Oct. 28 2004,06:20
I format all my pendrives as fat16 (type 6 )
Then I use the USB-ZIP option in my bios to bootup from the key.

I have placed a second partition on my 512MB key that is fat32,
but it is not used for booting DSL , only storage of extensions and mp3's

73
ke4nt

Posted by beakmyn on Nov. 05 2004,17:48
Code Sample
vi .xinitrc
comment out this line
# dillo -f /usr/share/doc/dsl/getting_started.html &>/dev/null &
>> add this
8 ~/slides.sh &
     9 fluxbox
8 opens my slides.sh script containing the
feh load string
     1 #! /bin/bash
     2 feh -D 10 -F  slideshow/*.jpg
# which launches my slideshow folder images - all .jpg files...
#  - it excludes JPEG or JPG (linux is case sensitive)


Ok so I've got dsl running and it's auto logging in (by default somehow) Cool. I find this out after I send an email pleading for yoda's help.

Anyway this script doesn't appear quite right to me? What's with the numbers? I typed it in as presented and got errors on those lines.

so instead I tried < Adam Franco's version >

I was su when I wrote the scripts but when I try to run them I get 'permission denied'

I just want to have feh load at startup without fluxbox then be able to kill feh if needed and load fluxbox.  Adam's scripts should do this I think?

I'm 99% there someone just help me with that last 1%

Posted by AwPhuch on Nov. 05 2004,18:03
Man that rules...did you use DSL instead of Xandros?

Brian
AwPhuch

Posted by beakmyn on Nov. 05 2004,18:08
Me?
I've got DSL running on mine (Me!=Adam) I didn't want to use Xandros because I didn't want to install bittorrent to download Xandros

I'm just trying to use his scripts but I keep getting permission denied when I try to run them as root or as user dsl. I'm guessing I have to change the permissions on them but don't know how or to what.

I created a sym link in rc3 and rc5 since it appears dsl defaults to run level 5.

Any help would be appreciated. I'll document the procedure whence it's working for others and post pictures of my picture frame.

<slap hand on forehead>
chmod u+x <scriptname>
Can't execute if it's not executable!

Posted by beakmyn on Nov. 05 2004,19:13
Ok so here's the deal: I'm 98% running.

How To: current version 0.8.3
Boot DSL
fb800x600 noscsi noapm noapic expert
I chose a framebuffer X not VESA (ymmv)
Install DSL to your HD
Enable APT [Apps > tools > enable APT]

open a terminal window
# apt-get install feh unclutter
Feh image viewer is now installed
unclutter blanks out the mouse cursor for you

Create the Scripts from AdamFranco.com< Slideshow Scripts >

Those would be
/usr/local/bin/slideshow.sh
/usr/local/bin/reloadslideshow.sh
The init script at /etc/init.d/picframe
Code Sample

for "export HOME=/root" I put export HOME=/home/dsl

since when I boot dsl it automatically logs in the user dsl
Code Sample

echo "Hello there mousey." > /dev/mouse
is /dev/psaux on my laptop


chmod u+x <scriptname>
for the 3 scripts this makes them executable so you don't a nasty 'Permission denied' error trying to run them

As su edit your XF86Config file and in the screen section add
Code Sample

BlankTime     0


Quote

To get the start the slideshow on boot, make a link in either/both of /etc/rc2.d/ or /etc/rc3.d/. All of the links in /etc/rc2.d/ are called with "start" when booting into runlevel 2 or higher. The links in /etc/rc3.d/ are called with "start" when booting into runlevel 3 or higher. The runlevel is set in /etc/inittab. Anyway, I am running the machine at runlevel 3 and I made a link called "S99picframe" that links to my init scrip. The command to do this is:


Looking at the DSL inittab it appears the default runlevel is 5
id;5;initdefault
so I created a symbolic link in rc5.d also

So after all this I reboot my laptop. DSL boots, The picture frame script runs. Feh starts up, unclutter hides my mouse, and image shows up! :)Yeah, then the images dissappears and fluxbox starts??  :( :(. What happened?

I'm thinking I forgot to get rid of fluxbox somewhere. I'm looking into it.

<edit>
.xinitrc is calling fluxbox # to comment it out.

Posted by AwPhuch on Nov. 06 2004,00:56
Goat a picture of that puppy running??

Brian
AwPhuch

Posted by beakmyn on Nov. 06 2004,01:11
Monday. It's not complety custom yet. Here's the specs:

Digital Hinote VP 575
166Mhz
4 GB hard drive
80 MB Ram
12.1 TFT display 800x600

This is the 2nd version. The motherboard on the first one went flakey. Right now the laptop is intact as far as the case goes. The LCD is custom mounted to a custom cut matte board. The matte only cost me $10 to get cut. I had my matte cut to include the LCD status display on the side. You'll see what I mean when I post pictures of it. Attached is a stock photo of the 500 series. I plan to remove the laptop from its case once it's working and mount it to the backing plate. I found that with the help a dremel tool I can remove the the 'screw lugs' from the plastic laptop case and then hot glue them to the frame backing. That way it's secure and mounted in all the original holes. What's nice is this unit is plenty fast for DSL and  there's no fan to make noise.

Posted by AwPhuch on Nov. 06 2004,04:04
Are you going to keep the keyboard just hidden?

Brian
AwPhuch

Posted by beakmyn on Nov. 06 2004,15:12
Because of the ps/2 port on the back, I may remove the keyboard and touchpad all together. Although it will still fit in the frame with it attached. Luckily the LCD 'cable' (conductive flat strip of plastic) is long enough and flexible enough to wrap around, in the current configuration. But be warned these cables had a tendency to break and it's near impossible to solder to these. I spent 16 hours doing it with wirewrap wire (28 ga?) it worked but it wasn't pretty, there was something like 20+ conductive traces I had to reroute.
Posted by cgp3389 on Nov. 07 2004,19:03
Well, here's an update for me.  I am time constrained and as I said in my original post, I am a real newb when it comes to Linux.  I wanted to use this as a learning experience but from what I am reading here, I have too much to learn and not enough time.  I could probably follow what you guys are doing if I sat in front of it and followed allong but I would not have the background knowledge of Linux and would not understand what I am doing.  I need to fully understand what I am doing before I do it.  So I will continue my Linux education with easier things first.

With that said; I decided to fall back on my DOS knowledge and complete this project.  I am at the point where I have completely disassembled the laptop and I am building a frame for it.  I will throw together some pictures and pages and will post a link to this thread at some point if there is any interest.

Here is what I've done so far:

Found some Displaying Software on the web written years ago by a student at a school in Taiwan.  It's pretty old but he had a DOS driver program that would run the 2MB S3 video of the laptop.  Also, his program would do image conversion and display tons of different formats incuding movies and it would run sound (not using sound for my frame)

I downloaded FreeDOS (www.freedos.org) for the OS.

Built my autoexec.bat and config.sys files to load up the drivers for the CD-ROM, switch to that drive, load the display driver and run a batch file that starts the show.

I had used Adobe Photoshop Album to batch scale all 700 slides down to a size that would work on the 800x600 panel. They are 16bit color and still jpeg compressed but that guys program handles them just fine.

Took about an hour to create and test the batch files.  I used a diskette to simulate the boot sector and the laptops hard drive to simulate the CD-ROM.

Burned a CD using the diskette as the boot sector and the hard drive contents as the data portion.

Removed the hard drive from the laptop and ran it with only a CD-ROM drive.  I want this to have as few moving parts as possible so that it is quiet and more reliable.

From there I just started removing stuff from the laptop and tested it each time I removed something.  It's now out of the case and down to 16MB (built in to the mainboard) I removed the keyboard, soundcard, hard drive, pcmcia slots..  a bunch of other parts.  It still starts with no errors and runs the show.  

Interesting thing I discovered about this laptop is that when there is no battery in it, it will power itself on when you plug it in to the AC.  This means I don't have to get creative with the laptops power buttons, a simple on/off rocker-switch connected to the AC line is all I will need.

I decided to forget about remote access to it for a couple reasons. 1.) My parents probably wouldn't use the feature. 2.) would require a network cable or wireless network... 3.) I am going to give my parents a DVD with the original high-res slides anyway in case they want to print any of them.  
I am also leaving the cd-rom drive door accessible so that the CD can be taken out.

So in summary:  It was no challenge and less fun doing this with DOS, but it works.

Posted by beakmyn on Nov. 08 2004,13:09
Cool. The linux version wouldn't have been that difficult, maybe next time around. The only downside I see is that if you want to add pictures you have to remaster a new CD, no big deal and if you find a better way to do something then you just send your parents a new CD. Then again your boot time is probably alot faster then mine.

[edit]
I should have the write-up down in the next couple days. I'm going to post it on my webspace and link it here. I'm hoping to be able to pull laptop apart tonight and get it installed.

Posted by beakmyn on Nov. 11 2004,20:22
Ok so here's < Work in Progress >

I'm still testing out methods of making it "Shutdown ErroProof"

I've had no luck making the filesystem readonly so now I'm working on making ext3 instead.

Posted by AwPhuch on Nov. 11 2004,20:41
Quote (beakmyn @ Nov. 11 2004,15:22)
Ok so here's < Work in Progress >

I'm still testing out methods of making it "Shutdown ErroProof"

I've had no luck making the filesystem readonly so now I'm working on making ext3 instead.

Hey bud!! < http://www.frontiernet.net/~beakmyn/pictureframe/ > the picures at the bottom dont work...I really wanted to see it in action man!!

Brian
AwPhuch

Posted by beakmyn on Nov. 11 2004,20:49
Do you have some type of pop-up blocker running? They open in a new window. I've tested them using Opera and Internet Explorer and works under both for me.

Anyway, tune2fs -j /dev/hda1 didn't work. I pulled the plug and when I rebooted it was mad. After a second reboot it ws ok but I still don't the error. This is the last hurdle. If I could figure out a way to make the filesystem survive having the plug pulled I'd be set.

Posted by AwPhuch on Nov. 11 2004,22:02
Perhaps a script to automatically reboot after it scans for errors...
Like:
Code Sample
# A return of 2 or higher means there were serious problems.
if [ $RC -gt 1 ]; then
       echo "$STRING: Failed"
       echo "*** An error occurred during the file system check."
       echo "*** Dropping you to a shell; the system will reboot"
       echo "*** when you leave the shell."
       export PS1="(Repair filesystem) \# # "
       sulogin
       echo "Unmounting filesystems"
       umount -a
       mount -n -o remount,ro /
       echo "Automatic reboot in progress."
       reboot -f
fi
to this
Code Sample
# A return of 2 or higher means there were serious problems.
if [ $RC -gt 1 ]; then
   export PS1="(Repair filesystem) \# # "
   if [ $RC -lt 4 ]; then
       echo "$STRING: Repaired."
       echo "*** Reboot required. The system will reboot in 30 seconds."
       sulogin -t 30
   else
       echo "$STRING: Failed"
       echo "*** An error occurred during the file system check."
       echo "*** Dropping you to a shell; the system will reboot"
       echo "*** when you leave the shell."
       sulogin
   fi
   echo "Unmounting filesystems"
   umount -a
   mount -n -o remount,ro /
   echo "Automatic reboot in progress."
   reboot -f
fi
borrowed from SmoothWall Express boot script
Perhaps the DSL guys can figure out a way to have it reboot after a scan...this way even if it does bomb..it will reboot and continue on by itself

It looks like the file might be /etc/init.d/mountall.sh but I might be wrong...one of the other supergurus might know where it is located better

Brian
AwPhuch

Posted by ico2 on Nov. 12 2004,14:23
this is a seriously cool sounding project :)
we should have a special page where people can put all the wierd projects done with dsl (another forum?)

Posted by Alan on Nov. 12 2004,15:10
Hi,
Just wanted to add $0.02 to the electronic pictureframe conversation.  I saw my < MedCosm Pictureframe > project mentioned and it runs very well with DSL.  I will add some directions on installing using frugal_lite in the near future, but the DSL board here is a much better resource.  

Anyway, regardless of what program is used for running the slideshow, my program may be useful in setting up an electronic pictureframe because it offers the ability to resave a directory of pictures in a smaller resolution, increased compression (decreased quality), and with a date-stamp superimposed on the picture.  This is particularly useful for compressing your high-quality bit-crushing 5.1 megapixel images down to something more reasonable for use on that Pentium 133 with 810 MB hard-drive and 800x600 display that you were making into a holiday gift for Aunt Bertha.  The program is FOSS released under the GPL.

Good luck with your electronic pictureframes.  :)

Posted by beakmyn on Nov. 12 2004,15:41
I saw the Medcodm frame and thought about that program.

Feh seems to be doing a good job. And since I came across a 4gb drive I'm no longer worried about file space. Since my pictures come off my windoze box I use Irfanview to barch resize before I burn them to CD. But, I like Medcosm idea, too bad it wasn't written in assembly ;)

A couple updates need to be made to that write up

Version 0.8.4 has automatic login if you don't select multi-user mode. I'm not sure when this was added.

Quote

Lastly, you could edit /etc/fstab to mount the root disk as readonly so that the system doesn't mind if the power is turned off at any time. I didn't do this since the ext3 filesystem seems pretty robust and I might want to update the pictures on the laptop occasionally.


The ro setting in fstab doesn't appear to work. I was never able to get /dev/hda1 to boot readonly so I used tune2fs -j to make it ext3 and now if I power down it just takes and extra reboot to get going again.

I'm looking into AwPhuch's idea and wondering if /etc/init.d/knoppix-autoconfig is the right place. Who's the GURU to point in the right direction?

[edit nov 13]

< Original thread from Awphuch's post about the reboot >

Posted by Alan on Nov. 14 2004,10:31
Thanks for some key pieces of info!

Didn't realize the RO option in fstab doesn't work...  Guess that's the difference between theory and practice.

The "tune2fs -j" command is sweet.  I had to format as ext2 because that's what tomsrtbt (Tom's root boot) supported, but, after running tune2fs and remembering to update /etc/fstab I have a journalling fs.  Oddly at boot, I still see a message like:

EXT2-fs warning (device ide0(3,2): ext2_read_super: mounting ext3 filesystem as ext2

but when I check using "mount" after boot, it is correctly mounted as ext3.  Where could this error be coming from?

I saw the automatic login in 8.4 but don't yet know how it works.  Does it a replace the "login" command similar to what I describe on my site?  Does it automatically login as root?

Posted by beakmyn on Nov. 14 2004,19:55
Quote
EXT2-fs warning (device ide0(3,2): ext2_read_super: mounting ext3 filesystem as ext2


I don't remember seeing that but I remember seeing a mount remount of /dev/hda1 in the knoppix-autoconfig. I'm going to have to a take a more detailed look at this script. I'm still unsure of the bootup process and since I'm no linux expert I'm not sure of all things involved. My guesses are there's other scripts and possibly kernel parameters that I don't know about yet.

Quote
I saw the automatic login in 8.4 but don't yet know how it works.  Does it a replace the "login" command similar to what I describe on my site?  Does it automatically login as root?


Another thing I'll have to look into. I just took it as a happy side effect of not having multiple users.

I'll probably have to do some researching on the Knoppix forums to get some answers.

Posted by beakmyn on Nov. 17 2004,18:16
Ok so I got a chance to read through knoppix-autoconfig. It seems that at line 472
Code Sample

if [ -n "$INSTALLED" ]; then
echo "${BLUE}Running from HD, checking filesystems...${NORMAL}"
# We are running from HD, so a file system check is recommended
[ -f /etc/init.d/checkroot.sh ] && /etc/init.d/checkroot.sh
[ -f /etc/init.d/checkfs.sh ]   && /etc/init.d/checkfs.sh
fi

# / must be read-write in any case, starting from here
mount -o remount,rw / 2>/dev/null

if [ -n "$INSTALLED" ]; then
echo -n "${BLUE}Running from HD, regenerate ld.so.cache and modules.dep...${NORMAL}"
# Regenerate ld.so.cache and module dependencies on HD
ldconfig; depmod -a 2>/dev/null
echo ""
fi


So maybe checkfs.sh is the place for the reboot script?

But at Line 925
Code Sample

# Start creating /etc/fstab with HD partitions and USB SCSI devices now
if checkbootparam "nofstab"; then
echo " ${BLUE}Skipping /etc/fstab creation as requested on boot commandline.${NORMAL}"
else
echo -n "${BLUE}Scanning for Harddisk partitions and creating ${YELLOW}/etc/fstab${BLUE}... "
rebuildfstab -r -u knoppix -g knoppix >/dev/null 2>&1
if [ -e /var/run/rebuildfstab.pid ]; then
# Another instance of rebuildfstab, probably from hotplug, is still running, so just wait.
sleep 8
fi
echo "${GREEN}Done.${NORMAL}"
fi


It seems there is a nofstab option. Is this why DSL is not reading my /etc/fstab?

Then there's this at line 1030
Code Sample

fstype(){
case "$(file -s $1)" in
*[Ff][Aa][Tt]*|*[Xx]86*) echo "vfat"; return 0;;
*[Rr][Ee][Ii][Ss][Ee][Rr]*)  echo "reiserfs"; return 0;;
*[Xx][Ff][Ss]*)  echo "xfs"; return 0;;
*[Ee][Xx][Tt]3*) echo "ext3"; return 0;;
*[Ee][Xx][Tt]2*) echo "ext2"; return 0;;
*data*)          echo "invalid"; return 0;;
*) echo "auto"; return 0;;
esac
}

# Try to mount this filesystem read-only, without or with encryption
trymount(){
# Check if already mounted
case "$(cat /proc/mounts)" in *\ $2\ *) return 0;; esac
# Apparently, mount-aes DOES autodetect AES loopback files.
[ -b "$1" ] && { mount -t auto -o ro "$1" "$2" 2>/dev/null; RC="$?"; }
# We need to mount crypto-loop files with initial rw support
[ -f "$1" ] && { mount -t auto -o loop,rw "$1" "$2" 2>/dev/null; RC="$?"; }
# Mount succeeded?
[ "$RC" = "0" ] && return 0
echo ""
echo "${CYAN}Filesystem not autodetected, trying to mount $1 with AES256 encryption${NORMAL}"
a="y"
while [ "$a" != "n" -a "$a" != "N" ]; do
# We need to mount crypto-loop files with initial rw support
mount -t auto -o loop,rw,encryption=AES256 "$1" "$2" && return 0
echo -n "${RED}Mount failed, retry? [Y/n] ${NORMAL}"
read a
done
return 1
}


So, it appears there's at least 3 spots I could possibly modify. I'd rather have /mnt/hda1 be readonly to begin with then I don't have to worry about corruption, but then I'm not sure which portion I need to modify.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.