Hi,
I was wondering if there has been any progress on this topic. I acknowledge
that
there are ways to avoid using C/C++ (which I 'd prefer as its not my
speciality).
I myself am looking towards using a shell script initiated from a LiveCD to
automate parts of the installation in a
user friendly manner as my particular distro is aimed at Linux Newbies based in
my University.
This is my pre-conceptual script which however is unfinished and untested. I
was wondering is I could obtain any suggestions regarding the direction i am
going. In particular I would very much like to tidy up the section where I
attempt to display to STDOUT what storage device are available. Is there some
udev commands I could use to actually display the make of the Hard Disk?
Also please tell me of anything that you don't think will work ( I have a bad
feeling about Chrooting from a script)
Appreciate any comments/sugestions
Regards
Kevin
----------------------------------------------------------------------------------
#!/bin/bash
echo --How many hard drives are installed on this machine?
USER VALUE CAPTURED =$HDN (might not need)
echo --The following ide drives have been found
ls /sys/bus/ide/devices/0.0/{*hda*,*sda*}
echo drives labelled hda are usually Primary/Master IDE
echo drives labelled hdb are usually Primary/Slave IDE
echo drives labelled hdc, usually refer to secondary IDE drives
echo SATA & SCSI drives use the same naming convention but are instead labelled
sda,sdb,sdc etc
echo pleaseselect the drive you wish to partition by typing the correct drive
ie; hda, hdb, sda etc
USER VALUE CAPTURED = $DRIVE
echo you will now enter the disk partitioning program. Please use extra care
when removing partitons. Do not worry about filesystem formats as these will be
dealt with in the next stage.
echo Please be carfull to remember your partion number designations ie;
hda1,sda2.
echo Create a root partition to the size of your choice.
echo Create a swap partition of about 500MB up to 1000MB
cfdisk $DRIVE
echo Please select your root partition
USER VALUE CAPTURED = $ROOT
echo Please select your swap partition
USSER VALUE CAPTURED = $SWAP
mke2fs -jv /dev/$ROOT
mkswap /dev/$SWAP
export TARGET=/home/TEMP (/home/TEMP will exist on my LiveCD)
mount -v -t ext3 /dev/$ROOT $TARGET
/sbin/swapon -v /dev/$SWAP
cp -frv /{bin,lib,opt,usr,sbin,srv,media} $TARGET
cp -frv /fake/needwrite/{etc,root} $TARGET
mkdir $TARGET/boot
cp -frv /isolinux/* $TARGET/boot
mkdir -pv $TARGET/{dev,proc,sys}
mknod -m 600 $TARGET/dev/console c 5 1
mknod -m 666 $TARGET/dev/null c 1 3
mount --bind /dev $TARGET/dev
mount -vt devpts devpts $TARGET/dev/pts
mount -vt tmpfs shm $TARGET/dev/shm
mount -vt proc proc $TARGET/proc
mount -vt sysfs sysfs $TARGET/sys
chroot "$TARGET" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ '
PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login
mkdir /{home,var}
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp
mkdir -v /var/{lock,log,mail,run,spool}
mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
________________________________
From: [EMAIL PROTECTED] on behalf of Tijnema !
Sent: Sat 20/01/2007 10:23
To: BLFS Support List
Subject: Re: Distribute my BLFS
Hi,
Copying the kernel from system to system is never good....
Best way to make such installation is by copying all other files , except the
/boot.
Then compile the kernel with the .config file and copy the files to /boot.
It takes some more time to install then, but it's a stable kernel then.
And of course, installing grub into the bootsector, with such command as
/sbin/grub-install /dev/hda
Then you might want to edit /boot/grub/menu.lst or something like that, and you
probably want to copy some of the grub stage files to /boot/grub
No C/C++ is required for this.
Tijnema
On 1/20/07, Gerardo Medellin Hdez. <[EMAIL PROTECTED]> wrote:
Ok. Kevin, Tank's for the response, I'll like to be guided for you.
I was thinking about made a Live CD from my blfs-distribution, and when
this work fine, mount all the filesystem ( / ) in a partition of the HD, and
wen it's all done, chroot to this copy of my original filesystem, copy the
kernel that i've compiled originally and install grub to make it bootable, but
i don't know if this is a good idea, right now I'm having trouble with the
scripts to make a Live CD from my blfs system.
Really tank you for any idea or guide that could give me.
Kevin Annies <[EMAIL PROTECTED] > escribió:
Hi Gerardo,
I wish to acheieve the same as you (create a distribution).
I may not be able to give you a definate solution but may be
able to guide you along the nessacery lines.
I made an assumption that to make sure my system was generic
enough to distribute, I created a bootable cd and used it on several machines.
I was originally thinking of creating a cd that contained a small Linux and the
contents of a main system, the small Linux existing primariliy for the purpose
of partitioning, and copying the contents of the main Linux onto the new
machine using a script. The tricky part comes when modifying the boot sector
using grub where I beleieve a little C/C++ is required. This method is
currently one that I am currently researching so I have no definate answers
yet.
If you are looking for a simple alternative, I've heard of
people using already available commercial installers such as Anaconda and
modifying them to work with the blfs system.
Sorry if this is not what you are looking for.
Regards
Kevin
________________________________
From: [EMAIL PROTECTED] on behalf of Gerardo Medellin Hdez.
Sent: Fri 19/01/2007 16:26
To: [email protected]
Subject: Distribute my BLFS
Hi, I've a BLFS system working pretty good, but now i want to
make a Install Disk to distribute it, somebody know how to make it, any tip or
trick is welcome.
Tank's.
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/
--------------------------------------------------------
NOTICE
This message and any files transmitted with it is intended for
the addressee only and may contain information that is confidential or
privileged. Unauthorised use is strictly prohibited. If you are not the
addressee, you should not read, copy, disclose or otherwise use this message,
except for the purpose of delivery to the addressee.
Any views or opinions expressed within this e-mail are those of
the author and do not necessarily represent those of Coventry University.
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page