Frugal Install Bootline Commands
Forum: HD Install
Topic: Frugal Install Bootline Commands
started by: zubalove
Posted by zubalove on Oct. 31 2005,19:50
A few months ago I did a frugle install. It went well, but for some reason it didn't create /opt on the specified hda. However I did manage to get mydsl extensions recognized by specifying mydsl=hda3 in the bootline commands of the install.
Now I'm reinstalling and I can't get anything to work right.
My questions:
The frugal install PDF indicates NOT to enter a mydsl location in the bootline commands. Is this correct?
When entering the commands, how should they be entered? Which, if any, need to be prefaced with "dsl"?
Are these frugle install problems native to certain releases? I'm using 1.4 until 2.0 is released. Are there any changes to the frugal installer in 1.5?
Thank you for any help.
Posted by adssse on Nov. 01 2005,02:25
Personally I prefer grub over lilo. To do this I believe you can just boot with a cd and run /usr/sbin/frugal_grub.sh, after that I believe all thats left is to tell it your partition and than install. It doesnt have all of the questions that frugal_install.sh does. After it installs you can enter your boot options into /boot/grub/menu.lst
Posted by NettoBr on Nov. 22 2005,10:48
Quote (adssse @ Oct. 31 2005,21:25) | Personally I prefer grub over lilo. To do this I believe you can just boot with a cd and run /usr/sbin/frugal_grub.sh, after that I believe all thats left is to tell it your partition and than install. It doesnt have all of the questions that frugal_install.sh does. After it installs you can enter your boot options into /boot/grub/menu.lst |
Hi Guys,
No I cannot change anything on /boot/grub...
I've made a Frugal Install and a install_grub after that.
Made a mkwriteable, but everything is still Read-Only.
Looks like mkwriteable runs ony once.
I want to change default and vga parameter.
I'm running DSL 2 RC2 on a Toshiba 2180CDT, and it's so good
HDA1 - Win98
HDA5 - EXT2 - for home and opt (485 MB)
HDA6 - EXT2 - for / (65 MB)
HDA7 - for swap (125 MB)
How can I change boot options if everything is RO???
Thanks from Brazil.
NettoBr
Posted by mark_one on Nov. 22 2005,14:54
hi.
maybe your'e trying to modify the grub menu.lst that's inside the knoppix image. that isn't possible because the image is mounted read only. if you type 'mount' you should see something like this:
/dev/root on / type ext2 (rw) /dev/hda1 on /cdrom type ext2 (rw) /dev/cloop on /KNOPPIX type iso9660 (ro) ...and so on...
what you have to do is to modify the menu.lst that is used for booting. in my case it's inside the /cdrom/boot/grub/ folder. i know that it's a bit irritating because there are two boot folders.
greetings
mark
Posted by NettoBr on Nov. 22 2005,17:33
Hello Mark-One,
Thanks for your correct reply, right to the point.
This is not irritating, what is irritating, boring, son of a gun, is that I've already done this in sudo su mode, but nothing happened, but after your reply everything happens.
May be a problem of BIOS, Been Irritating Operating the System.
Thanks a lot.
NettoBr.
Posted by tatlow on Nov. 22 2005,19:36
I'm sure everyone will reply "use grub" but I _like_ lilo
Anyway, I think I've found a slight bug. I've got a dsl-1.5 frugal install on /dev/hda1 with a home/backup /dev/hda3 (swap on hda2). I noticed two problems, ssh wasn't being started and when X came up all the icons were there. Looking at /proc/cmdline I saw that it ended with "noic" instead of ending in "noicons ssh".
I'm not sure of a way to run lilo to install a new bootloader in /dev/hda. When I 1st run it it complains about formatting in /etc/lilo.conf (which is linked to the knoppix)
If I give it the -C /mnt/hda1/boot/lilo.conf then it complains about the filesystem being read-only.
Is there a collection of parms to get lilo to run? I noticed there was a lilo.real and something like a liloconfigure (I'm locked out now that I rebooted it).
On a separate but related topic (at least for me). I haven't seen a way (that doesn't involve "toram" ... which I can't do since I only have 64MB) in order to free up /dev/cdrom. I was thinking one solution might be to edit the KNOPPIX file that's stored on hda1 but can't figure out how to mount this so I can edit it. Is this possible?
Thanks!
Posted by tatlow on Nov. 23 2005,05:18
Well it's always fun to post questions then be able to go back and give some answers. In the end I ditched lilo since I couldn't change the kernel parms. But this is the basic breakdown of what I did (in case this should help anyone else).
basic structure: Old Dell Inspiron 3800, 64MB ram hda1 -> 60MB, hda2 (swap) -> 128MB, hda3 remainder -> ~4G
Boot from the CD, delete and create the partitions w/ fdisk. [I had to reboot to make sure the partition table saw them correctly]. So always just boot to runlevel 2 (and 'base' 'norestore' will help if you've got a fouled up install like I did) then:
'mke2fs -j /dev/hda1' 'mke2fs -j /dev/hda3'
Run the frugal_install.sh script to set things up w/ lilo. Don't let it format your partition. I set 'opt=hda3 home=hda3' in the parms. Don't worry about any others (you'll be changing things later but the installer needs to know these two). I answered according to the PDF for the restore partition and the mydsl partition (i.e. say 'y' and hd3 for both choices)
Let that install, then reboot again using the CD (same 'base 2 norecover' parms)
'mke2fs -j /dev/hda1' [yes do this again]
To wipe out the lilo setup (but we needed to do lilo so we'd get hda3 setup!)
Then [well you might want to reboot one more time to make sure] you can go w/ grub. However, I found grub didn't like it if you did an install but didn't format the partitions (atleast it didn't one of the times I tried). However, the grub install file doesn't do ext3 and I got an error message from grub about not installing cause it wasn't a journaled fs.
So... 'cp /usr/sbin/frugal_grub.sh /ramdisk' then 'vi frugal_grub' and change 'mke2fs' to 'mke2fs -j'
Then you can do the install (don't worry about setting kernel parms since it doesn't ask anyway) and it will correctly format and setup grub onto /dev/hda1
Next, edit /mnt/hda1/boot/grub/menu.lst and add the appropriate parms to the kernel line (usually after the 'frugal' option). I added "restore=hda3 opt=hda3 mydsl=hda3" Save it and reboot! You should be mostly good to go.
I followed mikshaw's instructions, atleast sorta... from: (thank you biggest help _ever_) < http://damnsmalllinux.org/cgi-bin....;t=7936 >
and added the following lines to ~dsl/.filetool.lst etc/inittab etc/passwd etc/shadow etc/ssh/
(I know passwd is optional) I added ssh cause I hated having to reset the .ssh/known_hosts file after every reboot. Originally I had ssh in my kernel parms, but the problem was that ssh would start up (w/ new keys) and then the old keys would be restored. I So I added '/etc/init.d/ssh start' to bootlocal.sh and I think this has worked (well, it didn't the 1st time it seems to have after 1 more reboot <probably cause of backing up and restoring but it's late and might just be cause I screwed up somewhere).
One of the other problems I was having (mostly cause of bad kernel parms) was the *.dsl files not loading. If you put them (I also put the md5.txt files but I don't think that's necessary) in /mnt/hda3 they now get restored on bootup!!!
My _only_ problem now is that it will boot to X (but just to the basic X system but if I do anything it starts to load stuff up and then dies) I can type 'xinit' and it starts up fine and works! I tried setting the display values again... etc. but it's just strange cause it always worked before no problems. So not sure i'll have to play w/ that.
One other thing I want to play w/ is backing up and restoring /etc/fstab. Knoppix has a 'nofstab' cheat code so I may try that.
Thanks for a cool distro.
Posted by tatlow on Nov. 23 2005,16:26
Couldn't get X to work w/ hacking around so I did an install again and realized how much a pain it is.
So I followed the steps manually 1st the lilo install upuntil the lilo part and then the grub piece.
I patched the two together into a script but I'm not sure how to upload / share it w/ you guys.
I'll cut and paste it and maybe it will help. I ran through it to get the syntax straight but didn't do an install w/ it so be cautious but thought it might help.
Anyway the good news is I seem to be up and running now, the way I want to be... mostly atleast. Now it's custimazation time.
Code Sample | #!/bin/bash # Based on the work of Terry Gray University of Washington # Then a version by Robert Shingledecker # This version by Tatlow
. /etc/init.d/dsl-functions
if [ $UID != 0 ]; then echo "Got root?" echo -n "Press Enter key. "; read gagme exit 1 fi if [ -f /etc/sysconfig/toram ]; then echo "${RED}You are running 'toram' mode, not a liveCD!${NORMAL}" echo "${RED}You should not continue (i think)${NORMAL}" echo -n "Press any key to continue Contrl-C to quit. "; read gagme fi
echo "${RED}DSL ${WHITE}Compressed Image ${BLUE}Install/Upgrade.${NORMAL}" echo "${YELLOW}No responsibility for data loss or hardware damage!${NORMAL}" echo " " echo "A linux partition large enough to hold the image file" echo "must be created prior to installation." echo "This script is currently only for install from a LiveCD" echo "it follows the 'lilo' process but uses 'grub' for the boot loader" echo "also sometimes you may want to reboot after an fdisk and a partition format..."
echo -n "${CYAN}Enter the target partition to hold boot image ${WHITE}(EXAMPLE: ${YELLOW}hda1): ${NORMAL}" read BOOT_TARGET if [ -z "$BOOT_TARGET" ]; then echo "No partition chosen. The script will be terminated." echo -n "Press any key. "; read gagme exit 1 else DISK="$(echo $BOOT_TARGET | tr -d [0-9])" if [ "$DISK" != "hda" ]; then echo "${RED}The script is only known to work hda.${NORMAL}" echo "${RED}You continue @ your own risk${NORMAL}" echo "${RED}THERE WILL BE NO MORE WARNINGS${NORMAL}" echo -n "Press any key to continue Contrl-C to quit. "; read gagme fi FDISK="$(sfdisk -l /dev/$DISK|grep $BOOT_TARGET|awk '{print $(NF-1)}'|head -n1)" if [ "$FDISK" != "83" ]; then echo "${RED}Sorry system has not detected a linux partition.${NORMAL}" echo "You may need to just reboot, so the system can re-read" echo "the partition table, or create your partition(s) with ${YELLOW}cfisk" echo "${NORMAL}and then reboot." echo "Script is terminating..." echo -n "Press any key. "; read gagme exit 1 fi fi
echo "${CYAN}Enter the target partition to hold /home ${WHITE}(EXAMPLE: ${YELLOW}hda3): ${NORMAL}" echo -n "${CYAN}Hit enter w/ this blank if you don't want a separate home dir: ${NORMAL}" read HOME_TARGET
echo "${CYAN}Enter the target partition to hold /opt ${WHITE}(EXAMPLE: ${YELLOW}hda3): ${NORMAL}" echo -n "${CYAN}Hit enter w/ this blank if you don't want a separate home dir: ${NORMAL}" read OPT_TARGET
if [ ! -e /mnt/$BOOT_TARGET ]; then mkdir /mnt/$BOOT_TARGET fi if [ ! -e /mnt/$HOME_TARGET ]; then mkdir /mnt/$HOME_TARGET fi if [ ! -e /mnt/$OPT_TARGET ]; then mkdir /mnt/$OPT_TARGET fi
SOURCE="/cdrom" IMAGE="/cdrom" BOOT="/cdrom/boot/isolinux"
echo echo "${CYAN}Are there any other boot options do you want?" echo "${CYAN}Be aware if you try to use Lilo w/ long boot parms (which is" echo "${CYAN}almost any options, they will be truncated... that's why this uses grub" echo "${CYAN}If you entered data for /home or /opt above they will be included"
echo -n "${WHITE}Example: ${YELLOW}toram ssh lpd monkey ftp${NORMAL}: " read BOOT_OPS
echo echo "${CYAN}Choose language/keyboard if other than english, " echo -n "${WHITE}Example: ${YELLOW}cs da de es fr nl it pl ru sk${NORMAL}: " read LANG if [ ! -z "$LANG" ]; then LANG="lang=$LANG" fi
RESTORE=""; XVESA=""; MYDSL="" echo echo -n "${CYAN}Do you wish to specify a restore partition${NORMAL} (y/..)? " read answer if [ "$answer" == "y" ]; then echo -n "${CYAN}Enter the partition to be used for backup/restore.${WHITE}(EXAMPLE: ${YELLOW}hda3): ${NORMAL}" read DATA if [ -z "$DATA" ]; then echo "No partition chosen. The automatic USB/Floppy will be used." RESTORE="restore" else RESTORE="restore=$DATA" fi fi
echo echo echo "${CYAN}FYI I didn't use this next Q in my install as the logic path was burried" echo "${CYAN}However your mileage may vary so it's here" echo -n "${CYAN}Use default Xvesa settings, ${YELLOW}Xvesa${NORMAL} (y/..)? " read answer if [ "$answer" == "y" ]; then XVESA="xvesa" fi
#Tatlow: changed the wording here since it seemed to imply that you could say 'n' and the restore partition would be # used, which was untrue it would have been the boot partition echo echo "${CYAN}By default the boot partition is used for myDSL" echo -n "${CYAN}Do you wish to specify a different partition for myDSL${NORMAL} (y/..)? " read answer if [ "$answer" == "y" ]; then echo -n "${CYAN}Enter the partition to be used for myDSL applications.${WHITE}(EXAMPLE: ${YELLOW}hda3): ${NORMAL}" read DATA if [ -z "$DATA" ]; then echo "No partition chosen. The automatic /cdrom will be used." else MYDSL="mydsl=$DATA" fi fi
echo "${YELLOW}NOW THE TOUGH QUESTIONS:" echo "${YELLOW} Do you want to format the partitions?" echo "${YELLOW} The original script said to INSTALL answer y to format, for UPGRADE answer n.${NORMAL} " echo "${YELLOW} This script should let you keep going w/ or w/o a format.${NORMAL} " echo "${YELLOW} I'm going to format as ext3, but grub will load as ext2 (home and opt will be ext3${NORMAL} " echo "${YELLOW} PAY ATTENTION: I may repeat myself!!!!!!!!${NORMAL} " echo
if [ ! -z "$BOOT_TARGET" ]; then echo -n "${RED}Format the target partition ${MAGENTA}/dev/$BOOT_TARGET${NORMAL} (y/..)? " read answer if [ "$answer" == "y" ]; then echo echo "${RED}Last change to exit before destroying all data!!!!${NORMAL}" echo -n "${CYAN}Continue (y/..)?${NORMAL} " read answer if [ "$answer" != "y" ]; then echo "skipping...." else echo "${BLUE}Formatting .... ${NORMAL}" mke2fs -j /dev/$BOOT_TARGET fi fi fi
if [ ! -z "$HOME_TARGET" ]; then echo -n "${RED}Format the target partition ${MAGENTA}/dev/$HOME_TARGET${NORMAL} (y/..)? " read answer if [ "$answer" == "y" ]; then echo echo "${RED}Last change to exit before destroying all data!!!!${NORMAL}" echo -n "${CYAN}Continue (y/..)?${NORMAL} " read answer if [ "$answer" != "y" ]; then echo "skipping...." else echo "${BLUE}Formatting .... ${NORMAL}" mke2fs -j /dev/$HOME_TARGET fi fi fi
if [ ! -z "$OPT_TARGET" ]; then echo -n "${RED}Format the target partition ${MAGENTA}/dev/$OPT_TARGET${NORMAL} (y/..)? " read answer if [ "$answer" == "y" ]; then echo echo "${RED}Last change to exit before destroying all data!!!!${NORMAL}" echo -n "${CYAN}Continue (y/..)?${NORMAL} " read answer if [ "$answer" != "y" ]; then echo "skipping...." else echo "${BLUE}Formatting .... ${NORMAL}" mke2fs -j /dev/$OPT_TARGET fi fi fi mount /mnt/$BOOT_TARGET # Mount the new target drive
echo "${CYAN}Next I will begin copying the system boot files" echo -n "${CYAN}Do you want me to continue?${NORMAL} (y/..)? " read answer if [ "$answer" != "y" ]; then exit; fi
echo "${BLUE}Setting up system image on ${MAGENTA}/mnt/$BOOT_TARGET${NORMAL}"
if [ ! -d /mnt/$BOOT_TARGET/KNOPPIX ]; then mkdir /mnt/$BOOT_TARGET/KNOPPIX fi cp -f $IMAGE/KNOPPIX/KNOPPIX /mnt/$BOOT_TARGET/KNOPPIX/KNOPPIX
mkdir /mnt/$BOOT_TARGET/boot cp -f $BOOT/linux24 /mnt/$BOOT_TARGET/boot/. cp -f $BOOT/minirt24.gz /mnt/$BOOT_TARGET/boot/.
sync;sync
#Tatlow: This completes the 'setup' of the system minus the bootloader #maybe we want to copy some of the ramdisk to /opt and ~dsl but I didn't #and when I restarted files were there so mileage may vary
echo "${BLUE}Setting up grub${NORMAL}" mkdir /mnt/$BOOT_TARGET/boot/grub cp /boot/grub/device.map /mnt/$BOOT_TARGET/boot/grub/. sed 's/hda2/'$BOOT_TARGET'/' /boot/grub/menu.lst > /mnt/$BOOT_TARGET/boot/grub/menu.lst grub-install /dev/$DISK --root-directory=/mnt/$BOOT_TARGET
echo -n "${CYAN}If you have Windows installed you probably shouldn't have used this script${NORMAL}" echo -n "${CYAN}However, edit /mnt/$BOOT_TARGET/boot/grub/menu.lst and enable the last lines.${NORMAL}"
FULL_PARMS="" if [ ! -z "$OPT_TARGET" ]; then FULL_PARMS="opt=$OPT_TARGET" fi if [ ! -z "$HOME_TARGET" ]; then FULL_PARMS=" home=$HOME_TARGET" fi if [ ! -z "$RESTORE" ]; then FULL_PARMS=" $RESTORE" fi if [ ! -z "$MYDSL" ]; then FULL_PARMS=" $MYDSL" fi if [ ! -z "$XVESA" ]; then FULL_PARMS=" $XVESA" fi if [ ! -z "$LANG" ]; then FULL_PARMS=" $LANG" fi if [ ! -z "$BOOT_OPS" ]; then FULL_PARMS=" $BOOT_OPS" fi
echo "${GREEN}Grub Installation almost completed.${NORMAL}" echo "${GREEN}From here on out it's manual.${NORMAL}" echo "${GREEN}All you need to do is go edit /mnt/$BOOT_TARGET/boot/grub/menu.lst${NORMAL}" echo "${GREEN}and add the following kernel parms after the kernel line" echo echo "${GREEN} $FULL_PARMS"
sync
umount /mnt/$BOOT_TARGET umount /mnt/$OPT_TARGET umount /mnt/$HOME_TARGET
echo "${GREEN}Grub Installation Complete, after script exits you should reboot.${NORMAL}" echo -n "Press Enter key. "; read gagme exit 0
#CMDLINE="$(cat /proc/cmdline)" #POSITION=$(awk '{print index($0, "vga")}' /proc/cmdline) #if [ "$POSITION" == 0 ]; then # VGA=791 #else # RESULT=$(awk '{print substr($0,index($0, "vga")+3)}' /proc/cmdline) # VGA=$(getparam 'vga' "$RESULT") # if [ -z "$VGA" ]; then # VGA="$(getbootparam 'vga' 2>/dev/null)" # if [ -z "$VGA" ]; then # VGA=791 # fi # fi #fi
#echo "${BLUE}Setting up lilo${NORMAL}" #cat <<EOF >/mnt/$TARGET/boot/lilo.conf #lba32 #enable large disk support #timeout=30 #wait 3 seconds before auto-booting #vga=$VGA #boot=/dev/$DISK #put boot loader in MBR of target disk #root=/dev/$TARGET #set root to be partition of target disk #image=/boot/linux24 #label=DSL #initrd=/boot/minirt24.gz #read-only #APPEND="ramdisk_size=100000 init=/etc/init lang=us apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce nodma quiet frugal BOOT_IMAGE=/KNOPPIX/KNOPPIX $RESTORE $DAEMONS $LANG $XVESA $MYDSL" #EOF # #chmod 644 /mnt/$TARGET/boot/lilo.conf # #ln -sf /mnt/$TARGET/boot / # #lilo -C /mnt/$TARGET/boot/lilo.conf # #echo "${GREEN}Standby for reboot...${NORMAL}" #reboot |
Edited by SaidinUnleashed (Code tags are your friends. Use them~)
|