NetStumbler.org Forums

Go Back   NetStumbler.org Forums > Software > Unix/Linux
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 11-18-2004   #1 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Anybody know the ins/outs of Knoppix?

I'm having a heck of a time getting anyone on the Damn Small Linux OR Knoppix forums to help me out. So, I'm cashing in a few chips and posting my problem here in hopes of getting a response.

Quote:
Begin Problem
Here's my problem (cut&paste from knoppix)
Ok So I've installed Knoppix (DSL flavor actually) to my harddrive and then used

Code:
Code:
# tune2fs -j
to convert my ext2 to an ext3 filesystem. The system is a digital picture frame so typically there isn't a keyboard hooked up. I would like to implement a method similar to what Smoothwall uses for automatically rebooting after checking the filesystem for errors (in the event it gets turned off without a proper shutdown).

From the smoothwall forums:
/etc/rc.d/rc.sysinit

Code:
Code:
# 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

But I'm not sure if this is the right place in the Knoppix start up procedure. I've tried setting my /dev/hda1 to readonly in /etc/fstab but it seems like Knoppix ignores this. Can anyone assist me in this endevour?

http://www.frontiernet.net/~beakmyn/pictureframe


Code Sample

Code:
Code:
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

Code:
# 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

Code:
	

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.
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 11-18-2004   #2 (permalink)
G8tK33per
Asshole Emeritus
 
G8tK33per's Avatar
 
Join Date: May 2003
Location: S.E. VA.
Posts: 5,939
Can't help you out with that but since the Knoppix topic came up, saw this on Bookpool today:

http://www.bookpool.com/.x/tg7ob5t34n/ss?qs=knoppix
__________________
"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick."

Sons of Confederate Veterans
G8tK33per is offline   Reply With Quote
Old 12-04-2004   #3 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by G8tK33per
Can't help you out with that but since the Knoppix topic came up, saw this on Bookpool today:

http://www.bookpool.com/.x/tg7ob5t34n/ss?qs=knoppix
Just got this book.. It's recommended.. highly... Only item that pulls down, is the comment he gives in the section dealing with "wardriving with Knoppix".. A "wink, wink, nudge, nudge" comment followed by 2 scripts for associating to AP's with faked MAC adresses.
Almost decided to return the book to Amazon, but decided that the rest of the hacks was worth this error in judgement. But have written a mail and sent it to O'Reilly with a request to forward it to the author.

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 12-04-2004   #4 (permalink)
G8tK33per
Asshole Emeritus
 
G8tK33per's Avatar
 
Join Date: May 2003
Location: S.E. VA.
Posts: 5,939
...and it comes with the Knoppix CD.
__________________
"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick."

Sons of Confederate Veterans
G8tK33per is offline   Reply With Quote
Old 12-04-2004   #5 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
... alas not the current 3.6 but the previous 3.4 version...

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 12-04-2004   #6 (permalink)
G8tK33per
Asshole Emeritus
 
G8tK33per's Avatar
 
Join Date: May 2003
Location: S.E. VA.
Posts: 5,939
Quote:
Originally Posted by Dutch
... alas not the current 3.6 but the previous 3.4 version...

Dutch
Bastards.
__________________
"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick."

Sons of Confederate Veterans
G8tK33per is offline   Reply With Quote
Old 12-04-2004   #7 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by G8tK33per
Bastards.
They killed Kenny ? (Hehehe. Game of IGTLW ??)


Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 12-04-2004   #8 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Quote:
Originally Posted by Dutch
Just got this book.. It's recommended.. highly... Only item that pulls down, is the comment he gives in the section dealing with "wardriving with Knoppix".. A "wink, wink, nudge, nudge" comment followed by 2 scripts for associating to AP's with faked MAC adresses.
Almost decided to return the book to Amazon, but decided that the rest of the hacks was worth this error in judgement. But have written a mail and sent it to O'Reilly with a request to forward it to the author.

Dutch
Questions:

Is the book also on CD in a searchable indexed format?
Is, the info contained not available online through the half dozen knoppix mod websites?

Would it be against copyright if you posted the TOC of the book? I'm thinking about getting it but I'd hate to waste my money on something that will be outdated by the time it arrives.

Most importantly does it say how to hack X so that it doesn't make my LCD scream at a high pitch? Oh shit, you guys are gonna have a field-day with that.
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 12-04-2004   #9 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,098
Quote:
Originally Posted by beakmyn
...Most importantly does it say how to hack X so that it doesn't make my LCD scream at a high pitch? Oh shit, you guys are gonna have a field-day with that.
My IBM760/RH7.2 rig was doing that whenever I closed the lid. Damn near drove me nuts, until I figured out it was the feedback between the mike to the speakers. D'uh! I just needed to turn the mic off. If that's the case with your rig, a mixer utility may help quite a bit.

If it's actually the screen, it may be overdriven on the screen frequency.
__________________
Thorn
"I'm The Doctor. I'm a Time Lord. I am from the planet Gallifrey in the constellation Kasterborous. I'm 903 years old and I am the man who is going to save your lives and all 6 billion people on the planet below... You got a problem with that?"
Thorn is offline   Reply With Quote
Old 12-04-2004   #10 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Quote:
Originally Posted by Thorn
My IBM760/RH7.2 rig was doing that whenever I closed the lid. Damn near drove me nuts, until I figured out it was the feedback between the mike to the speakers. D'uh! I just needed to turn the mic off. If that's the case with your rig, a mixer utility may help quite a bit.

If it's actually the screen, it may be overdriven on the screen frequency.
It is the screen. It does it in framebuffer during boot-up and when I'm in X. It's worse when I move the mouse and the screen has to redraw. REALLY annoying.
Since it runs VESA can I still change the sync frequencies? How?
The worst thing is Win2000 runs perfectly, so that's what I'm on for the time being.
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 12-04-2004   #11 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by beakmyn
It is the screen. It does it in framebuffer during boot-up and when I'm in X. It's worse when I move the mouse and the screen has to redraw. REALLY annoying.
Since it runs VESA can I still change the sync frequencies? How?
The worst thing is Win2000 runs perfectly, so that's what I'm on for the time being.
Brand of laptop and modelno please.
Which Graphics chipset does the laptop use ?
Which Xserver module gets loaded ?
Which resolutions does Knoppix identify as available for the screen ?
Same problem if you are using XF_SVGA (3.0 series Xserver) iso XF86 (4.x series Xserver, the default) ?
Test with cheatcode (cheatcode listing is on the CD).

Table of contents available here... The book is not on the CD, the CD only contains the last version of the 3.4 knoppix series Live-CD's.
Check O'reilly's site for sample excerpts from the book : http://www.oreilly.com/catalog/knoppixhks/index.html

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 12-05-2004   #12 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Quote:
Originally Posted by Dutch
Brand of laptop and modelno please.
Which Graphics chipset does the laptop use ?
Which Xserver module gets loaded ?
Which resolutions does Knoppix identify as available for the screen ?
Same problem if you are using XF_SVGA (3.0 series Xserver) iso XF86 (4.x series Xserver, the default) ?
Test with cheatcode (cheatcode listing is on the CD).

Brand: HP Omnibook Xe2 -DD
Xserver: XF_86_SVGA
Xserver: XFree86 (vesa)
I tried both

Generic Monitor
Driver: SM710 LynxEM
Correct its a Silicon Motion LynxEM

H: 28.0-96Khz
V: 50-75Hz
Using Modes: 1024x768 800x600 640x480
It can do all these modes but defaults to 800x600 otherwise it has to do screen expanding.
I've tried booting with fb800x600 and screen=800x600 same noisy result

As far as I can tell the H and V frequencies are ok.
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 12-05-2004   #13 (permalink)
KoreK
Banned in DC
 
KoreK's Avatar
 
Join Date: Jul 2004
Posts: 102
1) Graphic mode: XFree86 has a siliconmotion driver, so booting in VESA mode might not be necessary. I would use VESA mode only if XFree86 would not work. Plus XFree86 4 does not need frequencies, try it as simple as possible first.
2) You got to be careful with read-only partitions. /var, /etc, /root, /tmp (and home or whatever you are using for users) need to be writable. I guess that's why there is a remount,rw line in the middle of the Knoppix setup script, which overrides the fstab config.

How are you planning your filesystem?
KoreK is offline   Reply With Quote
Old 12-06-2004   #14 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,805
Quote:
Originally Posted by KoreK
1) Graphic mode: XFree86 has a siliconmotion driver, so booting in VESA mode might not be necessary. I would use VESA mode only if XFree86 would not work. Plus XFree86 4 does not need frequencies, try it as simple as possible first.
2) You got to be careful with read-only partitions. /var, /etc, /root, /tmp (and home or whatever you are using for users) need to be writable. I guess that's why there is a remount,rw line in the middle of the Knoppix setup script, which overrides the fstab config.

How are you planning your filesystem?
Spilt: Two different machines here

Video Issues Omnibook:
I tried without Vesa and it garbled the screen, still noisy. It's even noisy in Framebuffer mode at the boot menu.

Fstab Issues Picture Frame:
The filesystem is currently a single EXT3 partition for everything*
except the pictures which are on a second ext3 partition. Under normal circumstances the system will boot run feh and that's it. If I want to do anything else with it I'll manually remount the filesystem. My worry is if it gets turned off while running. If I can't mount it readonly I'd like it to automatically check for errors and reboot since I don't have easy access to the power button, keyboard or mouse. It's a 'handless' unit.
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘
beakmyn is offline   Reply With Quote
Old 12-06-2004   #15 (permalink)
KoreK
Banned in DC
 
KoreK's Avatar
 
Join Date: Jul 2004
Posts: 102
Quote:
Originally Posted by beakmyn
Spilt: Two different machines here

Fstab Issues Picture Frame:
The filesystem is currently a single EXT3 partition for everything*
except the pictures which are on a second ext3 partition. Under normal circumstances the system will boot run feh and that's it. If I want to do anything else with it I'll manually remount the filesystem.
It's a bit complicated then. By default, some directories need to be writable: /etc (ldconfig), /var (logs,cron), /tmp (X). You could use a shmfs for them.
First thoughts:
  • Boot into runlevel 1 (lilo: "linux 1" at the prompt, grub: edit (e) the boot line, add a 1). Runlevel 1 is minimal, and partitions should be mounted read-only.
  • Try to launch your apps.
  • Use shmfs to setup writable directories. linux 2.6 can move dir with mount, else it's going to be messy (I can't think of anything else than a loop file).
  • When you get something working, time to figure out and set up a new runlevel.
  • Use a swap partition. Anyway it gets ditched at reboot, and since you are using a ram disk, it might get useful.

I'll burn the DSL later, and see what happens...
KoreK is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 12:40 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.