-   Linux From Scratch (
-   -   How to set envirment variable when boot from live CD (

happy_maoron 10-17-2005 03:34 AM

How can I set envirment variable when boot from live CD??
Does annybody knows an easy way to set environment variable when I can't save changes into hard disk?

I start linux from live-CD of LFS, so I can't save changes when modifing

an evironment variable. Now I know I can use command 'export' to modify an

environment variable from shell, but I can't write it into a script file, and I

must type such commands a lot of times to set all of my environment variables when I reboot my computer.
(When I run the script containing command 'export PATH=/bin', the environment

variable PATH will not be set appropriately)

happy_maoron 10-17-2005 04:37 AM

I find the answer now, I write a script file like this:

export LFS=/mnt/lfs
ln -s $LFS/tools/ /tools
export PATH=/tools/bin:/bin:/usr/bin

and use command 'source' to run the script file.

BittaBrotha 10-17-2005 04:43 AM

I remember reading someplace, maybe on the Livecd site, somebody had some scripts for running when you leave and come back.

Maybe it was in the hints section.

happy_maoron 11-01-2005 10:18 PM

thank you very much

All times are GMT -5. The time now is 05:03 PM.