View Poll Results: Should knoppix scan for home and config by default?
- Voters
- 10. You may not vote on this poll
-
Senior Member
registered user
Small patch for knoppix-autoconfig
Currently if you have myconf=scan (or one of the equivalents =scan) then you will get an error message about failing to mount /dev/ as AES256 (really annoying if you've used splash as if seems to lock the machine), the problem being that knoppix-autoconfig doesn't check to see if it found a config and hence tries to mount an invalid point. A small patch to knoppix-autoconfig will sort it out. Find the following section:
Code:
MYCONFDIR="$(findfile knoppix.sh)"
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
MYCONFDEVICE="/dev/${MYCONFDEVICE%%/*}"
MYCONFMOUNTPOINT="/mnt/${MYCONFDEVICE##/dev/}"
MYCONFDIR="${MYCONFMOUNTPOINT}"
And change it to:
Code:
MYCONFDIR="$(findfile knoppix.sh)"
if [ -n "$MYCONFDIR" ]; then
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
MYCONFDEVICE="/dev/${MYCONFDEVICE%%/*}"
MYCONFMOUNTPOINT="/mnt/${MYCONFDEVICE##/dev/}"
MYCONFDIR="${MYCONFMOUNTPOINT}"
else
FOUND_CONFIG="none"
fi
-
Senior Member
registered user
One step further, and a timezone bug?
Well while the above works fine and dandy, if you have scan setup by default but actually you don't want to use any home or conf what do you do? Well why not also add the following patch so you can do home|myconf=no|none!
Change the home section to
___________________________
[Aa][Uu][Tt][Oo]|[Ss][Cc][Aa][Nn]|[Ff][Ii][Nn][Dd])
MYHOMEDIR="$(findfile knoppix.img)"
MYHOMEDEVICE="${MYHOMEDIR##/mnt/}"
MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}"
MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}"
;;
[Nn][Oo]|[Nn][Oo][Nn][Ee])
echo "${GREEN}Home switched off.${NORMAL}"
;;
*)
echo "${CRE}${RED}Invalid ${CYAN}home=${RED} option '$HOMEDIR' specified (must
start with /dev/ or /mnt/ or 'scan').${NORMAL}"
echo "${CRE}${RED}Option ignored.${NORMAL}"
;;
esac
fi
___________________________
and change the conf section to
___________________________
[Aa][Uu][Tt][Oo]|[Ss][Cc][Aa][Nn]|[Ff][Ii][Nn][Dd])
MYCONFDIR="$(findfile knoppix.sh)"
if [-n "$MYCONFDIR" ]; then
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
MYCONFDEVICE="/dev/${MYCONFDEVICE%%/*}"
MYCONFMOUNTPOINT="/mnt/${MYCONFDEVICE##/dev/}"
MYCONFDIR="${MYCONFMOUNTPOINT}"
else
FOUND_CONFIG="none"
fi
;;
[Nn][Oo]|[Nn][Oo][Nn][Ee])
echo "${GREEN}Configdir turned off.${NORMAL}"
FOUND_CONFIG="off"
;;
*)
echo "${CRE}${RED}Invalid configdir '$MYCONFDIR' specified (must start with /de
v/ or /mnt/ or 'scan').${NORMAL}"
echo "${CRE}${RED}Option ignored.${NORMAL}"
FOUND_CONFIG="invalid"
;;
esac
___________________________
I've also come across what seems to be a problem concerning timezones. I was trying to figure out why my remaster had the time an hour early, even if I was in the right timezone! I think it's because the system clock is set ignorant of the timezone because hwclock is called in knoppix-autoconfig when TZ has not been exported. Now ordering gets tricky so I'm not 100% certain of how this should best be addressed. I think the answer is to export TZ after the tz cheatcode has been picked up (and localtime set) and then run hwclock there, that way it will see the correct TZ (or the best it's going to) when it sets the system clock. I assume there would also be no problem removing the first running of hwclock Sorry I'm posting these before I've tested them (when I can get back to it, tonight or perhaps earlier), but with 3.4 so imminent I wanted to mention them as soon as I came up with/across them.
-
Senior Member
registered user
I did something simialr to this so that it would not prompt the user to try to rescan for the encrypted FS if no persistent home was found where I had set home=scan as a default boot parameter in my remaster, Overclockix.
Your code is cleaner than mine though.
-
Senior Member
registered user
Re: One step further, and a timezone bug?
![Quote](images/misc/quote_icon.png)
Originally Posted by
bfree
[Aa][Uu][Tt][Oo]|[Ss][Cc][Aa][Nn]|[Ff][Ii][Nn][Dd])
MYCONFDIR="$(findfile knoppix.sh)"
if [-n "$MYCONFDIR" ]; then
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
Ooops, a small error got in there somehow (no space between [ and -n)! Should be:
Code:
[Aa][Uu][Tt][Oo]|[Ss][Cc][Aa][Nn]|[Ff][Ii][Nn][Dd])
MYCONFDIR="$(findfile knoppix.sh)"
if [ -n "$MYCONFDIR" ]; then
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
Similar Threads
-
By Frunktz in forum General Support
Replies: 1
Last Post: 07-27-2005, 04:08 PM
-
By monkeyman2000 in forum Hdd Install / Debian / Apt
Replies: 5
Last Post: 09-19-2004, 06:34 PM
-
By bigal2000 in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 07-07-2004, 04:53 PM
-
By farawayuser in forum Customising & Remastering
Replies: 2
Last Post: 12-06-2003, 12:28 AM
-
By kim in forum General Support
Replies: 4
Last Post: 12-05-2003, 04:07 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture](/store/img/g/RCAAAOSweqdeWaui/s-l225/A-Tech-8GB-DDR3-1600-PC3-12800-Laptop-SODIMM-204-P.jpg)
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
![Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3 picture](/store/img/g/mecAAOSw2Vlkv6Ot/s-l225/Crucial-DDR3L-16GB-1600-2x-8GB-PC3-12800-Laptop-SO.jpg)
Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3
$13.50
![HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture](/store/img/g/XNYAAOSwg81kv6CG/s-l225/HyperX-FURY-DDR3-8GB-16GB-32GB-1600-MHz-PC3-12800-.jpg)
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$16.50
![HP Hynix 64GB (4x16GB) PC3-8500R DDR3 1066 MHz CL7 Server RAM 500207-071 picture](/store/img/g/fbwAAOSwr29mdlKT/s-l225/HP-Hynix-64GB-4x16GB-PC3-8500R-DDR3-1066-MHz-CL7-S.jpg)
HP Hynix 64GB (4x16GB) PC3-8500R DDR3 1066 MHz CL7 Server RAM 500207-071
$12.50
![A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture](/store/img/g/HVQAAOSwZR1fWlxU/s-l225/A-Tech-8GB-PC3-12800-Desktop-DDR3-1600-MHz-Non-ECC.jpg)
A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G
$13.99
![Team T-FORCE VULCAN Z 32GB (2 x 16GB) PC RAM DDR4 3200 (PC4 25600) Memory picture](/store/img/g/~u4AAOSwK-liKn7t/s-l225/Team-T-FORCE-VULCAN-Z-32GB-2-x-16GB-PC-RAM-DDR4-32.jpg)
Team T-FORCE VULCAN Z 32GB (2 x 16GB) PC RAM DDR4 3200 (PC4 25600) Memory
$54.99
![HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM picture](/store/img/g/AhQAAOSwWi1kv6Pb/s-l225/HyperX-FURY-RAM-DDR4-16GB-8GB-32GB-4GB-3200-2666-2.jpg)
HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM
$9.64
![Micron 8GB DDR4 1Rx16 PC4-3200AA Laptop RAM Memory MTA4ATF1G64HZ-3G2E2 picture](/store/img/g/PxMAAOSw~T1mYfdq/s-l225/Micron-8GB-DDR4-1Rx16-PC4-3200AA-Laptop-RAM-Memory.jpg)
Micron 8GB DDR4 1Rx16 PC4-3200AA Laptop RAM Memory MTA4ATF1G64HZ-3G2E2
$10.00
![USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT picture](/store/img/g/EI0AAOSwsBpju-XZ/s-l225/USB-Flash-Drive-Memory-Stick-Pendrive-Thumb-Drive-.jpg)
USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT
$230.40
![Hynix 64GB 2Rx4 PC4-3200 RDIMM DDR4-25600 ECC REG Registered Server Memory RAM picture](/store/img/g/9nQAAOSwpFRkAmU7/s-l225/Hynix-64GB-2Rx4-PC4-3200-RDIMM-DDR4-25600-ECC-REG-.jpg)
Hynix 64GB 2Rx4 PC4-3200 RDIMM DDR4-25600 ECC REG Registered Server Memory RAM
$129.99