Author Topic: booting ubuntu installer from hard drive partition  (Read 17307 times)

peyote

  • Newbie
  • *
  • Posts: 15
booting ubuntu installer from hard drive partition
« on: May 02, 2010, 09:46:29 AM »
Hello,
I have just been using PLoP for a couple days. Congratulations on your work.
Helped me to boot a machine that could not boot from its hard drive and that has no CD.
Booted from pxe and then installed in hard drive.
Hard drive has other partitions. I downloaded ubuntu iso and dumped the contents into a partition as shown in https://help.ubuntu.com/community/Installation/FromLinux
I want to boot from that partition to install ubuntu in another larger partition.
PLoP is in /dev/hda2
Ubuntu installer is in /dev/hda3
How would I need to edit lilo.conf to be able to boot from the ubuntu installer partition?
Thanks in advance!

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #1 on: May 02, 2010, 11:41:56 AM »
hi
i am not sure if this is what you need

lilo.conf:
Code: [Select]
boot=/dev/hda
image=/casper/vmlinuz
label=installer
initrd=/casper/initrd.gz
append="boot=casper root=/dev/ram ramdisk_size=1048576 rw"

regards
elmar

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #2 on: May 02, 2010, 16:33:13 PM »
Thanks for the fast reply.
After the default lines  in lilo.conf I added:
other=/dev/hda3
image=/casper/vmlinuz
label=ubuntu-install
initrd=/casper/initrd.gz
append="boot=casper root=/dev/ram1 ramdisk_size=1048576 rw"

but lilo prints out a fatal error due to /casper/vmlinuz not found.
I had to extlinux /dev/hda3, since it was also giving error because hda3 had no boot signature.
I tried also mounting /dev/hda3 to /ubuntu-install and chroot /ubuntu-install, but chroot fails with "bash: not found".
Any ideas what to do next? Thanks in advance.

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #3 on: May 02, 2010, 16:45:24 PM »
you have to chroot to the directory where you mount /dev/hda3 and then run lilo

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #4 on: May 02, 2010, 17:17:18 PM »
Yes, but when I chroot the directory where I mount /dev/hda I get the error message: "chroot: cannot find command '/bin/bash': No such file or directory"
Needless to say, /bin/bash does exist.

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #5 on: May 02, 2010, 17:22:44 PM »
then run lilo -r mountdirectory

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #6 on: May 02, 2010, 18:23:29 PM »
Hello,
When I issu lilo -r /ubuntu-install I get another error:  Fatal: Cannot open: /etc/lilo.conf

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #7 on: May 02, 2010, 18:29:12 PM »
ok, then tell lilo which config file it should use

lilo -r /ubuntu-install -C anywhere/lilo.conf

did you ever read the lilo manpage?

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #8 on: May 02, 2010, 18:56:42 PM »
Hello,
Thanks for your patience.
Yes, I have read the lilo man page, and have looked up similar issues with google.
Maybe my plop installation could be the problem. As I stated, I booted plop from network.
I partitioned the HD and installed plop in /dev/hda2.
The drive has /dev/hda1, /dev/hda2, dev/hda3, /dev/hda4
I downloaded the ubuntu iso and rsync the mounted iso to /dev/hda3
Then I tried to edit lilo, but it's where I'm stuck.
I have just tried:

image=/dev/hda3
label=ubuntu-install
append="/casper/vmlinuz boot=casper root=/dev/ram1 ramdisk_size=1048576 rw"

and lilo without any other options seems to have worked. I will see if the option comes up on reboot.
I haven't had to use lilo in years when I used it back in the RH7 days, until now.
Thanks for your excellent support.

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #9 on: May 02, 2010, 19:06:26 PM »
hmm???
you say, you installed plop to hda2. do you mean the plop boot manager or plop linux? if you mean plop linux, then its posted in the wrong forum category and i was thinking in the wrong direction

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #10 on: May 02, 2010, 19:39:01 PM »
Yes, plop linux installed to hda2, and I was booting from hda2 to plop and doing everything there.
Well, upon reboot I got "Invalid PT, No operating system found."
So I can't choose neither plop, nor the ubuntu installer.
Seems like I'll have to netboot and reinstall again  ;D

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #11 on: May 02, 2010, 20:25:11 PM »
the installation of plop linux is not required.

to get this working is not difficult.

whats the output of "ls /ubuntu-install"

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #12 on: May 02, 2010, 20:34:56 PM »
Hello,
Following the instructions from the ubuntu help site, when I did:

rsync -a /tmp/install-cd /ubuntu-install  (instead of /tmp/installer since I had mounted /dev/hda3 to /ubuntu-install)
The contents of ubuntu-install was the directory install-cd and inside install-cd was the ubuntu stuff (casper directory, etc).
So I later did rsync -a . /ubuntu-install from inside the /tmp/install-cd directory, that way the contents of /ubuntu-install (and /dev/hda3) was the root of the cd (casper directory, etc).
Was I right in doing so, or should I do it as the ubuntu site again?

So now I can't boot from the HD, I have to set up the netboot server (first time I did it was from a backtrack live cd so all configuration files were lost).
What should I do once I boot from network? I can mount /dev/hda2 (where ploplinux is intalled) and edit the lilo.conf file again?

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #13 on: May 02, 2010, 20:46:00 PM »
it doesn't matter how you copy the ubuntu files to the hard disk. there are many other ways too. try to bootup plop linux with the network boot, then tell me the partition of the ubuntu files and the "ls" output.

« Last Edit: May 02, 2010, 20:54:02 PM by Elmar »

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #14 on: May 03, 2010, 18:42:11 PM »
Hello,
The partition where the ubuntu iso installer files are is /dev/hda3
And the contents from ls are:

lost+found
extlinux.sys
md5sum.txt
casper
install
isolinux
.disk
README.diskdefines
dists
pics
pool
pressed
ubuntu->
autorun.inf
wubi.exe

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #15 on: May 03, 2010, 18:48:41 PM »
whats the name of the mount directory?
now the ls output of casper/

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #16 on: May 03, 2010, 18:51:46 PM »
The mount point is /ubuntu-install

The contents of casper are:

filesystem.squashfs
filesystem.size
initrd.lz
filesystem.manifest
filesystem.manifest-desktop
vmlinuz

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #17 on: May 03, 2010, 18:54:11 PM »
initrd.lz or initrd.gz?

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #18 on: May 03, 2010, 19:03:28 PM »
Yes, it is initrd.lz (ubuntu 10.04)

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #19 on: May 03, 2010, 19:11:31 PM »
i see there is an extlinux.conf. whats the contents, is it from you?

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #20 on: May 03, 2010, 19:21:25 PM »
extlinux.sys came from doing extlinux to the partition /dev/hda3 so it would have a boot signature.

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #21 on: May 03, 2010, 19:25:14 PM »
that wasn't required.

ok, run "mc"
go to /ubuntu-install
run "touch lilo.conf"
edit lilo.conf with the key F4
add
Code: [Select]
boot=/dev/hda
image=/casper/vmlinuz
label=installer
initrd=/casper/initrd.lz
append="boot=casper root=/dev/ram ramdisk_size=1048576 rw"
press 2x esc to quit and save

then run "lilo -r /ubuntu-install -C /lilo.conf"

whats the error message

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #22 on: May 03, 2010, 20:45:33 PM »
It complained about no /dev in /ubuntu-install

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #23 on: May 03, 2010, 20:48:33 PM »
cp -avr /dev /ubuntu-install

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #24 on: May 03, 2010, 22:23:27 PM »
ok, after cp -arv /dev /ubuntu-install
I try lilo -r /ubuntu-install -C /lilo.conf
Now I get

Fatal: creat /boot/map  No such file or directory

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #25 on: May 03, 2010, 22:25:12 PM »
mkdir /ubuntu-install/boot

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #26 on: May 03, 2010, 22:30:57 PM »
OK,
Seems like lilo managed to do it.
Only 2 warnings came out:

LBA32 addressing assumed

The initial ramdisk is to big to fit between the kernel and the 15m-16m memory hole. It will be loaded in the highest memory as though the configuration file specified "large memory" and it will be assumed that the BIOS supports memory moves above 16M.


Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #27 on: May 03, 2010, 22:34:26 PM »
and what happened when you boot?

peyote

  • Newbie
  • *
  • Posts: 15
Re: booting ubuntu installer from hard drive partition
« Reply #28 on: May 03, 2010, 23:16:02 PM »
OK!
When I boot, no lilo boot menu, but it starts from hda3 into the ubuntu livecd in the hard disk.
I will try out if everything works in this machine before installing.
Thanks a lot for your excellent support!

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: booting ubuntu installer from hard drive partition
« Reply #29 on: May 04, 2010, 07:42:15 AM »
fine  ;D

there is no lilo menu, because its the minimum configuration.

best regards
elmar