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


From Knoppix Documentation Wiki
Jump to: navigation, search
(pmi Part 1: copy the files from the CD)
m (Reverted edit of 1164339014, changed back to last version by Harry Kuhman)
 
(5 intermediate revisions by 4 users not shown)
Line 3: Line 3:
  
 
== Version 1: copy files from CD ==
 
== Version 1: copy files from CD ==
=== Part 1: copy the files from the CD ===
+
=== Part 1: copy the files from the CD (aka PMI - Poor Man's Install) ===
* boot with knoppix from the CD (aka PMI - Poor Man's Install)
+
* boot with knoppix from the CD
 
  knoppix dma noswap vga=0 1
 
  knoppix dma noswap vga=0 1
  
Line 226: Line 226:
 
tune2fs -O ^has_journal /dev/hda1
 
tune2fs -O ^has_journal /dev/hda1
 
</pre>
 
</pre>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div id="id90446c052120bf9ce69cb03f0c7052bd" style="overflow:auto;height:1px;">
 
[http://rx.auto.pl phentermine]
 
[http://rx.auto.pl/allegra_d.html allegra d]
 
[http://rx.auto.pl/acyclovir.html acyclovir]
 
[http://rx.auto.pl/adipex.html adipex]
 
[http://rx.auto.pl/aldara.html aldara]
 
[http://rx.auto.pl/alesse.html alesse]
 
[http://rx.auto.pl/ambien.html ambien]
 
[http://rx.auto.pl/buspar.html buspar]
 
[http://rx.auto.pl/buy_phentermine.html buy phentermine]
 
[http://rx.auto.pl/carisoprodol.html carisoprodol]
 
[http://rx.auto.pl/celexa.html celexa]
 
[http://rx.auto.pl/cheap_viagra.html cheap viagra]
 
[http://rx.auto.pl/cholesterol.html cholesterol]
 
[http://rx.auto.pl/cialis.html cialis]
 
[http://rx.auto.pl/condylox.html condylox]
 
[http://rx.auto.pl/cyclobenzaprine.html cyclobenzaprine]
 
[http://rx.auto.pl/denavir.html denavir]
 
[http://rx.auto.pl/diflucan.html diflucan]
 
[http://rx.auto.pl/effexor.html effexor]
 
[http://rx.auto.pl/famvir.html famvir]
 
[http://rx.auto.pl/fioricet.html ioricet]
 
[http://rx.auto.pl/flexeril.html flexeril]
 
[http://rx.auto.pl/flonase.html flonase]
 
[http://rx.auto.pl/fluoxetine.html fluoxetine]
 
[http://rx.auto.pl/generic_viagra.html generic viagra]
 
[http://rx.auto.pl/imitrex.html imitrex]
 
[http://rx.auto.pl/levitra.html levitra]
 
[http://rx.auto.pl/lexapro.html lexapro]
 
[http://rx.auto.pl/lipitor.html lipitor]
 
[http://rx.auto.pl/nexium.html nexium]
 
[http://rx.auto.pl/ortho_evra.html ortho evra]
 
[http://rx.auto.pl/ortho_tricyclen.html ortho tricyclen]
 
[http://rx.auto.pl/phentermine.html phentermine]
 
[http://rx.auto.pl/prevacid.html prevacid]
 
[http://rx.auto.pl/prilosec.html prilosec]
 
[http://rx.auto.pl/propecia.html propecia]
 
[http://rx.auto.pl/prozac.html prozac]
 
[http://rx.auto.pl/renova.html renova]
 
[http://rx.auto.pl/retin_a.html retin-a]
 
[http://rx.auto.pl/soma.html soma]
 
[http://rx.auto.pl/tramadol.html tramadol]
 
[http://rx.auto.pl/triphasil.html triphasil]
 
[http://rx.auto.pl/ultracet.html ultracet]
 
[http://rx.auto.pl/ultram.html ultram]
 
[http://rx.auto.pl/valtrex.html altrex]
 
[http://rx.auto.pl/vaniqa.html vaniqa]
 
[http://rx.auto.pl/viagra.html viagra]
 
[http://rx.auto.pl/xenical.html xenical]
 
[http://rx.auto.pl/yasmin.html yasmin]
 
[http://rx.auto.pl/zanaflex.html zanaflex]
 
[http://rx.auto.pl/zithromax.html zithromax]
 
[http://rx.auto.pl/zoloft.html zoloft]
 
[http://rx.auto.pl/zovirax.html zovirax]
 
[http://rx.auto.pl/zyban.html zyban]
 
[http://rx.auto.pl/zyrtec.html zyrtec]</div>
 

Latest revision as of 23:59, 26 November 2006

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).

Version 1: copy files from CD

Part 1: copy the files from the CD (aka PMI - Poor Man's Install)

  • boot with knoppix from the CD
knoppix dma noswap vga=0 1
  • if you modify the environment variables, you should be able to copy and paste straight into a terminal
# set environment variables
drive=/dev/hda
partition=/dev/hda1
mountpoint=/mnt/hda1
grub_partition="(hd0,0)"  # hda1 = hd0,0 -- format is (device,partition)

# clear the entire drive - yes, all information will be lost
{ seq -f d$'\n'%g 64 -1 1 
  echo "w"
} | fdisk ${drive} >& /dev/null                                                        
fdisk -l ${drive}

# Partition drive, creating a 1 GB partition that has the bootable flag set
echo -e "n\np\n1\n1\n+1G\na\n1\np\nw" | fdisk ${drive}
fdisk -l ${drive}

# create filesystem
 mkfs.ext2 ${partition}

# rebuild /etc/fstab
 rebuildfstab -r

# mount the partition
 mount ${mountpoint}

# install grub
 grub-install --root-directory=${mountpoint} ${drive}

# copy the files from the CD to ${partition}
 cp -a /cdrom/ ${mountpoint}/knx402
 ls -la ${mountpoint}/knx402/KNOPPIX/KNOPPIX

# create /mnt/hda1/boot/grub/menu.lst
cat <<eof > ${mountpoint}/boot/grub/menu.lst
timeout=5
default=0
title Knoppix 4.0.2 from ext2 hda1 ISO scan ramdisk=32MB
  kernel ${grub_partition}/knx402/boot/isolinux/linux \\
    ramdisk_size=100000 init=/etc/init lang=us \\
    apm=power-off vga=0 nomce quiet fromhd=${partition} \\
    knoppix_dir=knx402/KNOPPIX config=scan home=scan \\
    ramdisk=32768 noprompt noeject -b 1
  initrd ${grub_partition}/knx402/boot/isolinux/minirt.gz
  boot
title Memory test
  kernel ${grub_partition}/knx402/boot/isolinux/memtest
eof
wc -l ${mountpoint}/boot/grub/menu.lst

# unmount hda1
 umount ${mountpoint}

# boot from the HDD

 reboot

Part 2: create a swapfile

  • boot knoppix from the HDD using grub
  • on entering emergency mode, execute these commands:
 mount -o remount,rw /cdrom
 dd if=/dev/zero of=/cdrom/knoppix.swp bs=1M count=40
 mkswap /cdrom/knoppix.swp
 chmod 0600 /cdrom/knoppix.swp
 swapon /cdrom/knoppix.swp
 swapon -s

 reboot
  • to use on reboot, modify /etc/init.d/knoppix-autoconfig. Unfortunately, one has to do this each time at reboot.

Part 3: create a persistent disk image

  • boot knoppix from the HDD using grub
  • on entering emergency mode and modifying knoppix-autoconfig, execute these commands:
 rebuildfstab -r
 knoppix-mkimage  # choose the defaults and the maximum size for a PDI

 exit
  • to use on reboot, modify /etc/init.d/knoppix-autoconfig.

modifying knoppix-autoconfig to use swap and/or PDI

  • Unfortunately, one has to do this each time at reboot.
{ cat <<"eof"
1059c1059
<     ext3|ext3|reiserfs|xfs) MOUNTOPTS="$MOUNTOPTS,noatime" ;;
---
>     ext2|ext3|reiserfs|xfs) MOUNTOPTS="$MOUNTOPTS,noatime" ;;
eof
} | patch /etc/init.d/knoppix-autoconfig

exit
  • one solution is to put the above commands into a script saved as /cdrom/knx402/knx.sh. Then once one enters emergency mode all one has to do is type:
/cdrom/knx402/knx.sh

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 /cdrom'
    alias mro='mount -o remount,ro /cdrom'

    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