Distribute my BLFS

Ken Moffat ken at linuxfromscratch.org
Mon Feb 19 12:03:40 PST 2007


On Mon, Feb 19, 2007 at 06:05:35PM -0000, Kevin Annies wrote:
> 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).
>  
 Please don't top post - apart from being regarded as bad manners on
this list, it's confusing.  Also, snip what you are replying to so
that it is relevant.

 I still think that the subject of installers is likely to drift
outside the scope of this list, but I've got a few suggestions.

> 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?

 Maybe.  The kernel knows (it shows up in dmesg).  On the machine
I'm sat in front of, I found the disk _model_ in sysfs, but the path
to it is hardware-dependant, and I've no idea how to use it to
derive the manufacturer or model.  I had to give up a recursive grep
through the whole of sysfs, it was taking too much cpu, so maybe the
data is out there as text, dunno.

ppc64 ken at bassman ~ $find /sys/devices/pci000* -type f -name 'model'\
2>/dev/null
/sys/devices/pci0001:00/0001:00:03.0/0001:02:0c.0/host0/target0:0:0/0:0:0:0/model

ppc64 ken at bassman ~ $cat \
/sys/devices/pci0001\:00/0001\:00\:03.0/0001\:02\:0c.0/host0/target0\:0\:0/0\:0\:0\:0/model 
ST380013AS      

 Looking at the various 'vendor' files in that area, the best
content I can see is 'ATA' which isn't a lot of use.

 If you know that the target machines have ATA/SATA drives that
support SMART, you could use smartmontools, e.g.

ppc64 root at bassman /home/ken #smartctl -d ata -a /dev/sda | egrep \
'^Model Family|^Device Model|^Serial Number'
Model Family:     Seagate Barracuda 7200.7 and 7200.7 Plus family
Device Model:     ST380013AS
Serial Number:    5MR1EA2M

 Note that it still doesn't tell you how big the drive is - I guess
most people only have one drive, but knowing the model family might
not be enough to clarify which drive is selected (and then you have
the case of two similar drives in one machine - I'm glad it isn't my
problem).
>  
> Also please tell me of anything that you don't think will work ( I have a bad feeling about Chrooting from a script)
 I always use a script to enter chroot, the command I pass is
'/bin/bash --login' - in your case, pass the path/name of the script
which is to run in chroot.  'man chroot'

 Obviously, some things will not work in the same way (e.g. in an
LFS build, invoking /bin/bash --login after building shadow will not
do a lot of good).  Getting out of chroot, and passing back success
or failure, might be interesting, I don't know.

>  
> Appreciate any comments/sugestions
>  
> Regards
> Kevin
> 
> echo --The following ide drives have been found
> ls /sys/bus/ide/devices/0.0/{*hda*,*sda*}
> 
 If you are using udev, it will generate nodes in /dev for what is
present.  For a naive user, /dev/sda is bad enough, but they will
probably need to get used to that.  Telling them it is on
/sys/bus/scsi/devices/0\:0\:0\:0/block\:sda is probably guaranteed
to scare them off for life.  Also, see where my disk is ?
(hint - it isn't under ide, the only thing in ide is the cdrom).

 If you do need to capture the full path, use sed or cut to break it
(if the path always has the same number of elements).

> 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

 Oh joy: nowhere to store personal files separate from the system
filesystem itself, apparently no way to use existing freespace (if
there is any), just feed it a disk and let it wipe out anything
already there.  As a stage between 'having nothing' and 'having a
useful installer', the concept is good enough to let you test out
where some problems are.  As something to offer to inexperienced
users, I don't think there will be many takers if they know it's
going to wipe out their current OS and data if they only have a
single drive.

 Beyond that, the size of the root partition needs a minimum size
(you will know how big it needs to be to fit all the essential
programs).  For swap, you can probably give them a better idea using
some heuristics and how much memory they have.

 Perhaps you should try some distro installers, to see what they get
right and wrong in the user interface, e.g. some will default to
partition sizes and mount points, or let you enter expert mode to
specify it all yourself.  You have to remember the people in your
target audience.  When I started with linux, partitioning a disk was
not a foreign concept to me.  Nowadays, most people start with a
machine where the OS has already been installed.  Try not to scare
them away.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the blfs-support mailing list