boot with the right keyboard from live-cd


Forum: Other Help Topics
Topic: boot with the right keyboard from live-cd
started by: ypx

Posted by ypx on Sep. 07 2004,14:45
is there an easy way to boot from live-cd with the right keyboard layout from the start (before typing cheatcode) ?
can it be done by editing a file and then overwriting it on the cd ?
or does it require remastering ?

step by step instruction would be nice...

Posted by henk1955 on Sep. 07 2004,21:12
as i now understand you remaster your livecd.

i think yout should be able to make a change in isolinux.cfg.
change lang=us to lang=fr or some thing like that.
you could even add mydsl_dir=(/optional/jeux)

Posted by ypx on Sep. 07 2004,21:30
Quote
as i now understand you remaster your livecd

i don't know if reburning it using MS windows and nero can be called remastering. and since i'm not working on my computer here, partitioning the hard drive to do a real remaster is out of question.
Quote
i think yout should be able to make a change in isolinux.cfg.
change lang=us to lang=fr or some thing like that.
you could even add mydsl_dir=(/optional/jeux)

i didn't know which file to edit. now i think i will be able to succeed.
is there anything special that i should be aware of before editing (like keeping the exact same file size or things like that) ?
and won't reburning isolinux.cfg on the cd using multisession prevent it from booting ?

Posted by henk1955 on Sep. 07 2004,21:38
i am not sure about the cdrom
but i have tried it with the syslinux.cfg from the boot floppy and that works fine

Posted by ypx on Sep. 07 2004,22:50
edited isolinux.cfg and burned it to the cd
booted from the cd...
tried to type some cheatcode... saw that changes weren't taken into account at this point
waited for fluxbox to start
tried some typing and got proof that it didn't work
checked if editing was taken in account by opening  isolinux.cfg in scite
it was...
but my keyboard is still not well mapped :(

Posted by ypx on Sep. 08 2004,07:33
well, after searching the forum. it seems that i must edit /etc/init.d/knoppix-autoconfig
now the problem is how to reflect the changes inside the file it's extracted from, to be able to replace it with the edited version. all that without partitioning hard disk.
any clue how to do this ?

Posted by henk1955 on Sep. 08 2004,09:50
i have been searching to and found and other post:
< keymaps >

if you type lang=fr at the bootpompt ( or change in isolinux.cnf)
and add: "loadkeys fr" to bootlocal.sh

you wil get a french keyboardlayout
i tried loadkeys fr and then i got azerty

Posted by ypx on Sep. 08 2004,10:48
and where is bootlocal.sh located ?
i didn't find it...
or is it a file that i have to create myself ?
if it is, where should i place it ?

? ? ?

Posted by henk1955 on Sep. 08 2004,10:59
1. did the "loadkeys fr" work?
2. did the lang=fr work?

bootlocal.sh is in /opt
bootlocal.sh is run where DSL startup.
if you change bootlocal.sh you have to put its name in /home/dsl/filetool.lst and use backup/restore.

there are plenty of post in the forums that explain how, filetool.lst, backup/restore works or you can "read the manual" from DSL Control Panel.

Posted by ypx on Sep. 08 2004,11:07
well lang=fr did work,
but my purpose was to have a french keyboard from the start
(before typing cheatcode that is)
so that i could type cheat code with ease (not having to guess where is what)
in this case i don't see how helpfull the restore option can be...
but i perhaps miss some knowledge here

however thanks for your help, i learn a lot from your answers

Posted by henk1955 on Sep. 08 2004,11:22
maybe you can find a french KNOPPIX3.4 and is it posible to create a bootfloppy from it to try and if t works put it in your cd
Posted by ypx on Sep. 08 2004,13:15
your last post made me think about the german.kbd file i found in the cd boot/isolinux dir.
so i took my french KNOPPIX3.4 cd and went to the same dir.
i found that german.kbd was not there, but there was a bootkey.map file.
After a quick comparison beetween the 2 in scite, i found that it was the same kind of file, but with a different layout.
so i tried and replaced german.kbd by bootkey.map after renaming the last one.
but that still didn't solve my problem.
comparing the isolinux.cfg of both cd, i saw a reference to bootkey.map (kbdmap bootkey.map) in the knoppix one, and no reference to german.kbd in the dsl one.

i think that adding kbdmap followed by the name of the keyboard map file to isolinux.cfg should do the trick (if not, i really don't understand how linux work (but i will keep trying))

any idea if it can work this way ? and if not, why ?

i'm now wondering about the german.kbd usefullness the way things are configured now ...

Posted by ypx on Sep. 08 2004,14:51
well... i'll have to try something else
adding kbdmap bootkey.map to isolinux.cfg and putting bootkey.map inside the isolinux dir did not seem to do anything at all...
this is very confusing to me, as i expected something to change (in either a good or a bad way, that's not the problem) and my tinkering with these files seems not to be seen at all by the computer on startup. ???
after checking, the changes in the files are here, but it doesn't seem to affect anything...

Posted by clacker on Sep. 08 2004,15:01
ypx, you need to create a keyboard map with
/usr/sbin/keytab-lilo fr > fr.kbd
, place it into your boot/isolinux directory, and then modify your boot/isolinux/isolinux.cfg file by adding the line KBDMAP fr.kbd below the TIMEOUT 300 line.  Also change the lang=en to lang=fr.  The first 4 lines of my isolinux.cfc file looked like this:
Code Sample
DEFAULT linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
TIMEOUT 300
KBDMAP fr.kbd


I did this and I did get the azerty keyboard when I entered things at the boot menu.

At first I thought resources were your problem, so I came up with this neat way to remaster with a minimum of memory and no hard drive.  The key is to use multisession CD burning, and the -x switch for mkisofs.  It's OK as long as the boot sector is in that first burn.  You would need to modify the -C and -M switches based on you values from cdrecord -scanbus and cdrecord -msinfo.

Code Sample
mkdir newcd
cp -Rp /cdrom/boot newcd
scite newcd/boot/isolinux/isolinux.cfg
    < add a line KBDMAP fr.kbd
      and change lang=en to lang=fr>
/usr/sbin/keytab-lilo fr > fr.kbd
mv fr.kbd newcd/boot/isolinux/fr.kbd
mkisofs -no-pad -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o mydsl.iso newcd
rm -rf newcd
rm -f fr.kbd
cdrecord -v blank=fast dev=0,1,0
cdrecord -multi -v dev=0,1,0 mydsl.iso
rm mydsl.iso
cdrecord -msinfo dev=0,1,0
mkisofs -J -r -C 0,12326 -M 0,1,0 -o second.iso -x /cdrom/boot /cdrom
cdrecord -multi -v dev=0,1,0 second.iso


Don't try to add this to a multisession CD you've already made, because the boot will look at the boot sector it made the first time you burned it.  Blank the CD if you can (CD-rw) or use a new CD if you can't.

Posted by ypx on Sep. 08 2004,15:43
i'm now understanding why my attempt failed as i was trying to modify things by using multisession.

will your instructions work if i boot with the toram option (to be able to burn the new cd from within dsl as the computer i'm working on will only boot dsl cd from my cd burner and not from my dvd reader) ?

excuse me if my questions seem dumb, but i'm really new to the linux world, and tried things like mkisofs and cdrecord yet. i'm really happy to have found such a responsive and friendly user forum :D

by the way a script allowing to remaster without touching the hard drive would be a very neat addition to future dsl version, as it would make it more standalone :cool:

Posted by clacker on Sep. 08 2004,15:55
I know that my method will work, given you have enough memory.  I was easily able to remaster with 256Megs of ram, but I had 2 cd drives so I wasn't booting to memory.

If you were able to modify the isolinux.cfg file before and have changes take effect using your method (your 9/8 7:07 post), I can't see why you couldn't combine our two methods:

Modify boot/isolinux/isolinux.cfg the way you did before, only add the KBDMAP fr.kb line in addition to the lang=fr change.  Create the french keyboard file with

/usr/sbin/keytab-lilo fr > fr.kbd

and move that into the boot/isolinux directory.  Then burn the disk.  Since your change worked for lang=fr, it should work for the rest as well.

Posted by ypx on Sep. 08 2004,16:04
well it seems i did wrote with my feet in the post you quote :p , as i was meaning that the cheatcode "dsl lang=fr" was working.
none of my editing in isolinux.cfg had visible results, which i now understand as i was using multisession to apply the changes to the cd (not cdrw) content.

Posted by ypx on Sep. 08 2004,16:06
i assume the newcd dir is to be created inside /ramdisk
is this right ?

Posted by clacker on Sep. 08 2004,16:17
yes, I created mine right in the /home/dsl directory ( ~ ).

But now that I think about it,  I can't see why the multisession CD wouldn't work.  It's isolinux.bin and boot.cat that are linked to the boot sector, not isolinux.cfg.  So perhaps you could come up with a clever way to burn the dsl 0.8.0 iso as a multisession, and the create a newcd/boot/isolinux directory with a new syslinux.cfg and fr.kb, make a new iso, and then burn that as well.

Posted by ypx on Sep. 08 2004,16:25
perhaps isolinux.bin is somehow linked to the first burn of isolinux.cfg and wont read the updated one ?
Posted by clacker on Sep. 08 2004,16:50
I believe that's the case, athough I could be wrong.  I tried burning the entire cd as multisession and then overwriting the boot/isolinux/isolinux.cfg but that didn't work.  The method I outlined before definately works, though.  You need to read the dev values from cdrecord -scanbus and the multisession information after the first burn with cdrecord -msinfo dev=X,X,X to get the values for your system.
Posted by clacker on Sep. 08 2004,20:49
Here is the easiest, smallest, simplest procedure I could write for remastering with the French keyboard layout.  I stripped out all the multisession stuff, and wrote it to use minimum resources.  I think this should be relatively easy and clear.

First, you need to make some directories to work in.  sudo su changes you into the root user, the mkdir commands make directories, and the cp commands copy files and directories:

Code Sample

cd /home/dsl
sudo su
mkdir newcd
cp -Rp /cdrom/boot newcd
cp -Rp /cdrom/lost+found newcd
cp -p /cdrom/index.html newcd


Next create a keyboard map for the french keyboard, and edit your isolinux.cfg file.  I used scite for editing, but beaver works too.  Add a line KBDMAP fr.kbd and change lang=en to lang=fr.  The ln command in the last line below creates a link to the KNOPPIX directory (this saves a lot of space).

Code Sample
/usr/sbin/keytab-lilo fr > newcd/boot/isolinux/fr.kbd
scite newcd/boot/isolinux/isolinux.cfg
ln -s /cdrom/KNOPPIX newcd/KNOPPIX


Now create the iso file with mkisofs.  This might look like two commands lines, but it all gets typed on one long line.  The only difference here is the -f switch I used because the KNOPPIX directory was a link to the cdrom.  If you had room on another drive, you could mount it and rather than saving mydsl.iso, you could change it to /mnt/hda1/mystuff/mydsl.iso.  That way you would barely need any memory at all.

Code Sample
mkisofs -f -no-pad -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o mydsl.iso newcd


The last thing you need to do is to burn the iso to a cd.  There are a lot of ways to do it, I use cdrecord.  Since the last step yielded an iso file, any burning technique will work.  cdrecord -scanbus tells you what device number to use.  It's three coma separated numbers.  You can see that I use 0,1,0 because on my machine, that's what it was.

Code Sample
cdrecord -scanbus
cdrecord dev=0,1,0 mydsl.iso

Posted by ypx on Sep. 09 2004,07:50
real good work here.
even a linux complete newbie should be able to understand your procedure, as it's very clearly explained.
well done.
i'll try it as soon as i can (i'm really lacking of time)
thanks a lot

Posted by roberts on Sep. 09 2004,14:02
With the new 0.8.1 and the mkmydsl script, you can now easily create not only a custom cd with your myDSL extensions but also easily have your boot time options on the new cd without a complete remaster, and without manually editing any file..
Posted by ypx on Sep. 09 2004,17:05
wow ! i'm impressed with your reactivity to user demands !
really.
i'm downloading it now and will give feedback soon.

Posted by ypx on Sep. 09 2004,20:27
will the mkmydsl script take care of keyboard mapping before cheatcodes ?
if not, that would be a great improvement to think about.

Posted by roberts on Sep. 09 2004,21:13
Actually this has been in the planning for quite awhile. I am amazed that what I am usually working on somehow always seems to be in discussion just when I am about to release it.

You will have to boot one more time with your cheatcodes to get correct keyboard in order to have a useable system to run the mkmydsl script. It is not on the menu because of its run time requirements.

For example I only have a single cdrom in my machine, it happens to be a cdwriter, so I have to boot with
dsl 2 toram
then I can run mkmydsl script.

Some have two cdroms one to boot and run from and another for cdwrite, they could possible run it from a normal mode.

Anyway, it has been tested and a version has been around since the inception of the mydsl introduction. Only new feature was to add the prompt for boot time options.

For more notes see: < http://damnsmalllinux.org/cgi-bin....;t=2484 >

Posted by ypx on Sep. 13 2004,12:34
time to give feedback about your method, clacker...

i'll be short, except for the -f switch in mkisofs, it works fine  :
i now own a dsl cd that boot with french keyboard from the start :cool:
but i had to copy the KNOPPIX dir into newcd as mkisofs didn't seem to able to build the iso with the link.

important things to note :
- when editing isolinux.cfg remove a number of # equal to the number of char you added to keep file size constant
- the newcd dir must be created in the ramdisk or on a linux partition, not a windows one.

i'll now have to retry because it seems that the cd is closed, so i can't add dsl extension to it by using multisession (i couldn't add them to the first burn as my computer doesn't have enough memory to hold both the dsl base and the extensions in the ramdisk). i guess i'll have to change a switch in mkisofs, is that right ?

Posted by clacker on Sep. 13 2004,14:32
sure, you could copy the KNOPPOX directory to the newcd directory, and run mkisofs without the -f switch.  So you would type everything except the -f in the mkisofs command.

Did you type the entire mkisofs command on one line?  My post did say that you need to type that whole third code box as one big line.  This web forum wraps the long lines, so they look like two.

to copy the KNOPPIX directory use cp -Rp /cdrom/KNOPPIX newcd/KNOPPIX

Posted by ypx on Sep. 13 2004,14:46
i did type the entire mkisofs command as a single line. and mkisofs said something like it was unable to use the KNOPPIX dir (from memory)...

however, what do i need to change to burn the iso as the first burn of a multisession cd ? is it a mkisofs switch ? a cdrecord one ? both ?

Posted by clacker on Sep. 13 2004,14:59
for the first burn to a multisession cd, it's the cdrecord that needs a switch.  Use cdrecord -multi

for the second burn, the iso needs to be made differently.  That's where you need the cdrecord -msinfo command and then make the iso with the -C and -M switches.

look < here >, or try searching the forums using the search button.

Posted by ypx on Sep. 13 2004,15:42
ok, thanks a lot for your very helpfull answers.
i'm now thinking about a complete remastering as i will try to build a french version of damnsmalllinux if it's ok.

by the way, i think a neat trick to have the mkmydsl script give results in using appropiriate keyboard from start is to replace german.kbd with layout.kbd, add a "kbdmap layout.kbd" line to isolinux.cfg and add a line like "/usr/sbin/keytab-lilo (chosen language here) > master/boot/isolinux/layout.kbd" to the mkmydsl script

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