Difference between revisions of "Poor-mans install, grub, PDI"


From Knoppix Documentation Wiki
Jump to: navigation, search
(reorganized, expanded notes)
m (grub menu.lst v01: copy files from CD)
Line 21: Line 21:
 
  grub-install --root-directory=/mnt/hda1 /dev/hda
 
  grub-install --root-directory=/mnt/hda1 /dev/hda
  
* copy the files to /dev/hda1
+
* copy the files from the CD to /dev/hda1
  cp -a /cdrom/ /mnt/hda1/knx402
+
  cp -a /cdrom/ /mnt/hda1/knx402 &
 
+
* copy the kernel and minirt.gz to partition
+
cp -a /cdrom/boot/isolinux/linux /mnt/hda1/knx402/
+
cp -a /cdrom/boot/isolinux/minirt.gz /mnt/hda1/knx402/
+
  
 
* create /mnt/hda1/boot/grub/menu.lst
 
* create /mnt/hda1/boot/grub/menu.lst
Line 35: Line 31:
 
default=0
 
default=0
 
title Knoppix 4.0.2 from ext2 hda1 ISO scan ramdisk=32MB
 
title Knoppix 4.0.2 from ext2 hda1 ISO scan ramdisk=32MB
kernel (hd0,0)/knx402/linux ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=0 nomce quiet fromhd=/dev/hda1 knoppix_dir=knx402/KNOPPIX config=scan home=scan ramdisk=32768 noprompt noeject -b 1
+
kernel (hd0,0)/knx402/boot/isolinux/linux ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=0 nomce quiet fromhd=/dev/hda1 knoppix_dir=knx402/KNOPPIX config=scan home=scan ramdisk=32768 noprompt noeject -b 1
         initrd (hd0,0)/knx402/minirt.gz
+
         initrd (hd0,0)/knx402/boot/isolinux/minirt.gz
 
         boot
 
         boot
 
title Memory test
 
title Memory test
         kernel (hd0,0)/foo/memtest
+
         kernel (hd0,0)/knx402/boot/isolinux/memtest
 
eof
 
eof
 +
cd
 
</pre>
 
</pre>
 +
 +
* boot from the HDD
 +
umount /mnt/hda1
 +
reboot
  
 
= Notes so far =
 
= Notes so far =

Revision as of 07:54, 20 December 2005

Summary

The goal is to boot Knoppix from the HDD using a bootloader (grub) and three files: the ISO, a swap file, and a persistent disk image (PDI).

v01: copy files from CD

  • boot with knoppix from the CD
knoppix dma noprompt noeject vga=0 1
  • Partition drive, creating a 1 GB partition that has the bootable flag set
fdisk /dev/hda
  • create filesystem
mkfs.ext2 /dev/hda1
  • rebuild /etc/fstab
rebuildfstab -r
  • mount the partition
mount /mnt/hda1
  • install grub
grub-install --root-directory=/mnt/hda1 /dev/hda
  • copy the files from the CD to /dev/hda1
cp -a /cdrom/ /mnt/hda1/knx402 &
  • create /mnt/hda1/boot/grub/menu.lst
cd /mnt/hda1/boot/grub/
cat <<eof > menu.lst
timeout=5
default=0
title Knoppix 4.0.2 from ext2 hda1 ISO scan ramdisk=32MB
	kernel (hd0,0)/knx402/boot/isolinux/linux ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=0 nomce quiet fromhd=/dev/hda1 knoppix_dir=knx402/KNOPPIX config=scan home=scan ramdisk=32768 noprompt noeject -b 1
        initrd (hd0,0)/knx402/boot/isolinux/minirt.gz
        boot
title Memory test
        kernel (hd0,0)/knx402/boot/isolinux/memtest
eof
cd
  • boot from the HDD
umount /mnt/hda1
reboot

Notes so far


knoppix dma bootfrom=/dev/hda1/k402.iso vga=0 1

knoppix dma bootfrom=/dev/hda1/k402.iso vga=0 -b 1

knoppix dma noprompt noeject vga=0 1

{
rmmod tulip
modprobe de2104x
pump -k
pump -i eth0 &

    alias mrw='mount -o remount,rw /cdrom2.loop/'
    alias mro='mount -o remount,ro /cdrom2.loop/'

    alias alias.save='alias > ~/.aliases.bash' 
    alias cls='clear' 
    alias cp='cp -i' 
    alias dir='ls -la' 
    alias function.delete='unset -f' 
    alias function.list='declare -f' 
    alias function.save='declare -f > ~/.functions.bash ' 
    alias h='history' 
    alias l.='ls .[a-zA-Z]* --color=tty' 
    alias less='less -iX -S -# 10' 
    alias ll='ls -l --color=tty' 
    alias ls='ls --color=tty' 
    alias more='less' 
    alias mv='mv -i' 
    alias path='echo $PATH' 
    alias pause='kill -19' 
    alias pd='cd -' 
    alias perl='perl -MEnglish -w' 
    alias rehash='hash -r' 
    alias resume='kill -18' 
    alias rm='rm -i' 
    alias root='sudo su -' 
    alias ssh='ssh -X' 
}
    alias.save 


----
simple install (non-iso)
v1 - install using tohd, boot using fromhd, grub

## tohd
# a "/" at the end of /dev/hda/ -- doesn't work. ext2
knoppix dma noprompt noeject vga=0 tohd=/dev/hda1/ 1

# sans "/" -- works. ext2
knoppix dma noprompt noeject vga=0 tohd=/dev/hda1 1

# specifying knoppix_dir -- doesn't work
knoppix dma noprompt noeject vga=0 tohd=/dev/hda1 knoppix_dir=foo 1

# specifying a subdir -- doesn't work. ext2
knoppix dma noprompt noeject vga=0 tohd=/dev/hda1/foo 1

# specifying fromhd -- works. ext2
knoppix dma noprompt noeject vga=0 tohd=/dev/hda1 fromhd 1

## fromhd
# specify fromhd -- works
knoppix dma noprompt noeject vga=0 fromhd=/dev/hda1 1

# specifying knoppix_dir as foo -- doesn't work, yet
knoppix dma noprompt noeject vga=0 fromhd=/dev/hda1 knoppix_dir=foo -b 1

# specifying knoppix_dir as KNOPPIX -- works
knoppix dma noprompt noeject vga=0 fromhd=/dev/hda1 knoppix_dir=KNOPPIX -b 1

# rename /dev/hda1/KNOPPIX to /dev/hda1/foo and specifying knoppix_dir as foo -- works
knoppix dma noprompt noeject vga=0 fromhd=/dev/hda1 knoppix_dir=foo -b 1

# mv /dev/hda1/KNOPPIX to /dev/hda1/foo and specifying knoppix_dir as foo/KNOPPIX -- works
knoppix dma noprompt noeject vga=0 fromhd=/dev/hda1 knoppix_dir=foo/KNOPPIX -b 1

## grub
# copy kernel and initrd to /foo
cd  /cdrom/boot/isolinux/
cp -a minirt.gz linux memtest /mnt/hda1/foo/

# modify grub stanza
cd /mnt/hda1/boot/grub/
cat <<eof > menu.lst
timeout=5
default=0

title Knoppix 4.0.2 from ext3 hda1 ISO scan ramdisk=32MB
	kernel (hd0,0)/foo/linux ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=0 nomce quiet fromhd=/dev/hda1 knoppix_dir=foo/KNOPPIX config=scan home=scan ramdisk=32768 noprompt noeject -b 1
        initrd (hd0,0)/foo/minirt.gz
        boot


title Memory test
        kernel (hd0,0)/foo/memtest

eof

# boot using grub -- works


v2 - include a PDI
create a pdi on /dev/dha1.  So far, booting with this PDI hasn't worked.  Looks like theres a bug in /etc/init.d/knoppix-autoconfig.  The code has two RegExs for ext3 and none for ext2.  The solution is to boot using the -b cheatcode, modify /knoppix-autoconfig, and continue booting.  Then the PDI is recognized and mounted.

# misc boot lines and commands
knoppix dma noprompt noeject vga=0 -b 1


tune2fs -O ^has_journal /dev/hda1