Subject: install without reformatting

From: Matthew Wilcox <[email-masked]>
Date: Thu, 4 Jun 1998 01:31:30 +0100 (BST)

I've finished my exams now (raay! ;-) and I've been working on a method
for installing ARMLinux without repartitioning your hard drive.  I agree
with Russell that a loopback mount is the way to go, and I've now got
an ext2 file on my ADFS partition acting as a partition.  Both reading
and writing work, though I've not stressed it too hard.

Russell, do you have a booter which supports the initrd method?
Otherwise, I might just do something which requires you to leave a boot
floppy in permanently - would people find that acceptable while they're
fiddling with the system?  I'm also less than sure that this is always
going to work - non techy people can skip the next paragraph.

An initrd would do the following:
  initrd gets copied to ram0
  ram0 gets mounted on /
  kernel executes /linuxrc -- this is all standard initrd stuff
  /linuxrc is a program which:
    mounts proc on /proc
    mounts /dev/hda1 on /adfs
    losetup /dev/loop0 /adfs/linux
    cat 0700 > /proc/sys/realrootdev (or something..)
    unmounts /proc
  then it exits and the initrd code
  remounts / on /initrd
  mounts loop0 on /
  boot sequence continues as normal - ie /sbin/init

The careful observer will now be asking `but what happens to /adfs?'.
And the answer is that _in 2.0_ it stays mounted - on /initrd/adfs
without /proc/mounts being updated.  This is work-roundable, but it
means that the initrd can never be freed and it'll be taking up ram.
Perhaps I need to introduce a special variant of initrd that copes with
having multiple filesystems mounted.  Maybe I'll ask on linux-kernel
next week when everyone's calmed down from Linux Expo.

-- 
Set Alias$Case Set Alias$[ |||| |MSet Alias$Otherwise Set Alias$[ \ Matthew
"" |MSet Alias$When If %0=%%0 Then Set Alias$[ "" ||MIf %0=%%0    \ Wilcox
Then Set Alias$Otherwise Set Alias$[ |||||||||||||||| ||MIf       \
%0=%%0 Then Set Alias$When Set Alias$[ ||||||||||||||||
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Phil Norman <[email-masked]>
Date: Thu, 4 Jun 1998 10:10:25 +0100 (BST)

> I've finished my exams now (raay! ;-) and I've been working on a method

Bah - it's alright for some :-(

> and writing work, though I've not stressed it too hard.

That'd be great - esp. if it's ready for the South-East show.  Please 
drop me a line if it does become ready for then - and I'll have a go at 
reinstalling linux (again) with this method so I know how it's done.  Is 
there a Guinness Book of Records entry for the person who's installed 
linux the most times on the same box?

> floppy in permanently - would people find that acceptable while they're

Would it be possible to get the bootloader to load a ramdisc from the 
ADFS partition?  This would be similar to what happens under the BSD 
installer (which is very sexy) and would make life a lot less 
time-consuming for those of us who reinstall linux regularly ;-).

Bye for now,
Phil

-- 
Linux: The best things in life are free.

Phil Norman, mailing from Exeter University.
email:	[email-masked]
URL:	http://newton.ex.ac.uk/general/ug/norman