Can Ubuntu LiveCD boot another installation?
Trent Lloyd
lathiat at bur.st
Fri May 6 05:13:34 UTC 2005
Matthew,
If you boot the install cd in 'rescue' mode (type rescue at the isolinux
boot prompt) then it will drop you into a shell on your partition so
that you can use grub-install to repair your install (and whatever else
you want to do) and off you go.
Cheers,
Trent
On Fri, 2005-05-06 at 00:35 -0400, Matthew S-H wrote:
>
>
> ______________________________________________________________________
>
> I recently have been having some problems with booting. I removed
> a partition, all of the partitions got their device blocks moved down
> by
> one (ie: /dev/hdb10 became /dev/hdb9). Anyway, more or less, things
> are in shambles.
>
> I have been getting help from someone on this list off-list to try to
> solve
> this problem (thanks cmorgan047 at yahoo.com).
>
> Before I follow his advice and re-install LILO, I would like to ask 2
> things:
>
> 1.
> Is there any way to boot off of a partition using the Live CD instead
> of GRUB? (I just thought of this). I noticed that there is an option
> on the main menu of the Ubuntu Live CD (all the way at the bottom)
> that says "Boot from first harddisk partition". Is it possible to
> boot from the second harddisk? I have Windows installed on my first
> harddisk and Ubuntu installed on /dev/hdb9, with /dev/hdb10 mounted
> as /boot.
>
> 2.
> Which do you all prefer:
> LILO or GRUB? (only for those who have tried both)
>
> 3.
> Anyone here a guru on reinstalling GRUB when a previous installation
> of it in the MBR of a secondary harddrive has become, for lack of
> better words, confused??
>
> 4.
> I just wanted a few "second opinions" before I went ahead with
> "cmorgan047 at yahoo.com"'s idea and installed LILO. Does anyone see any
> problems? Or does anyone have any alternative suggestions that they
> think would be better? Anyway, here is an edited copy of his last
> e-mail.
>
> From: cmorgan047 at yahoo.com
> Subject: Re: Partition Table (Resend)
> Date: May 4, 2005 10:42:07 PM EDT
> To: mathbymath at aol.com
> [snip]
> trouble is lilo creates files and puts them in the
> boot directory.
> (this directory location is coded into the MBR or
> master boot record)
> lilo needs to write 2 files to the /boot directory
> specifically
> map and boot.0300
>
> this is not a show stopper issue but it makes changes
> different.
>
> if not in /boot we can write them in another directory
> like /realboot
> (which we already know we can mount your boot
> partition here)
>
> (Note: it can be changed back to using the proper
> /boot dir name after you get the first real linux boot
> working (not from a live cd))
>
> mount -t ext3 /dev/hdb9 /mnt
> vi /mnt/etc/fstab (change mount point for /dev/hda9
> from
> /boot to /realboot)
> mkdir /realboot
> mount -t ext3 /dev/hdb10 /realboot
> mkdir /mnt/realboot (used later when rebooting)
> vi /mnt/etc/lilo.conf
>
> unsure how you will get the following text in this
> file into
> /mnt/etc/lilo.conf
>
> you may have to type it in manually (only once)
> [snip]
> you should only have one uncommented line for these
> options - other and boot in the lilo.conf file
>
> boot is your boot device (where to write the MBR -
> master boot record)
> this should be the first booting drive. for me it is
> /dev/hda
>
> other should point to the C:/ drive or main boot
> partition for windows.
> Not sure which of the NTFS partitions this is.
>
> lilo.conf (bare)
>
> -----------------------Starts after this line
> -------------------
> lba32
> boot=/dev/hda # use if boot harddrive is first device
> #boot=/dev/hdb #use if boot harddrive is second device
> install=menu
> map=/realboot/map
> delay=20
> prompt
> timeout=150
> vga=normal
> default=Linux2.6.10.5
> image=/realboot/vmlinuz-2.6.10.5-386
> label=Linux2.6.10.5
> read-only
> root=/dev/hdb9
>
> other=/dev/hdb1 #use if windows is installed on this
> harddrive b first partition
> #other=/dev/hda1 # use if you have windows on
> harddrive (device a) first partition
> label=windows
>
>
> ------------------Ends before this line
> ------------------------
>
> or
>
> lilo.conf (full)
> ---------------starts after this line
> ------------------------------
>
> # /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
> # --------------- `install-mbr(8)',
> `/usr/share/doc/lilo/',
> # and `/usr/share/doc/mbr/'.
>
> #
> +---------------------------------------------------------------+
> # | !! Reminder !!
> |
> # |
> |
> # | Don't forget to run `lilo' after you make changes
> to this |
> # | conffile, `/boot/bootmess.txt', or install a new
> kernel. The |
> # | computer will most likely fail to boot if a
> kernel-image |
> # | post-install script or you don't remember to run
> `lilo'. |
> # |
> |
> #
> +---------------------------------------------------------------+
>
> # Support LBA for large hard disks.
> #
> lba32
>
> # Overrides the default mapping between harddisk names
> and the BIOS'
> # harddisk order. Use with caution.
> #disk=/dev/hde
> # bios=0x81
>
> #disk=/dev/sda
> # bios=0x80
>
> # Specifies the boot device. This is where Lilo
> installs its boot
> # block. It can be either a partition, or the raw
> device, in which
> # case it installs in the MBR, and will overwrite the
> current MBR.
> #
> boot=/dev/hda # use if boot harddrive is first device
> #boot=/dev/hdb #use if boot harddrive is second device
>
> # Specifies the device that should be mounted as root.
> (`/')
> # Placed with each image instead (not here)
> #root=/dev/hda3
>
> # Enable map compaction:
> # Tries to merge read requests for adjacent sectors
> into a single
> # read request. This drastically reduces load time and
> keeps the
> # map smaller. Using `compact' is especially
> recommended when
> # booting from a floppy disk. It is disabled here by
> default
> # because it doesn't always work.
> #
> # compact
>
> # Installs the specified file as the new boot sector
> # You have the choice between: bmp, compat, menu and
> text
> # Look in /boot/ and in lilo.conf(5) manpage for
> details
> #
> install=menu
>
> # Specifies the location of the map file
> #
> map=/realboot/map
>
> # You can set a password here, and uncomment the
> `restricted' lines
> # in the image definitions below to make it so that a
> password must
> # be typed to boot anything but a default
> configuration. If a
> # command line is given, other than one specified by
> an `append'
> # statement in `lilo.conf', the password will be
> required, but a
> # standard default boot will not require one.
> #
> # This will, for instance, prevent anyone with access
> to the
> # console from booting with something like `Linux
> init=/bin/sh',
> # and thus becoming `root' without proper
> authorization.
> #
> # Note that if you really need this type of security,
> you will
> # likely also want to use `install-mbr' to reconfigure
> the MBR
> # program, as well as set up your BIOS to disallow
> booting from
> # removable disk or CD-ROM, then put a password on
> getting into the
> # BIOS configuration as well. Please RTFM
> `install-mbr(8)'.
> #
> #password="boot pass not required"
>
> # Specifies the number of deciseconds (0.1 seconds)
> LILO should
> # wait before booting the first image.
> #
> delay=20
>
> # You can put a customized boot message up if you
> like. If you use
> # `prompt', and this computer may need to reboot
> unattended, you
> # must specify a `timeout', or it will sit there
> forever waiting
> # for a keypress. `single-key' goes with the `alias'
> lines in the
> # `image' configurations below. eg: You can press `1'
> to boot
> # `Linux', `2' to boot `LinuxOLD', if you uncomment
> the `alias'.
> #
> # message=/boot/bootmess.txt
> prompt
> timeout=150
> # prompt
> # single-key
> # delay=100
> # timeout=100
>
> # Specifies the VGA text mode at boot time. (normal,
> extended, ask, <mode>)
> #
> # vga=ask
> # vga=9
> #
> vga=normal
>
> # Kernel command line options that apply to all
> installed images go
> # here. See: The `boot-prompt-HOWO' and
> `kernel-parameters.txt' in
> # the Linux kernel `Documentation' directory.
> #
> # append=""
>
> # Boot up Linux by default.
> #
> default=Linux2.6.10.5
>
> image=/realboot/vmlinuz-2.6.10.5-386
> label=Linux2.6.10.5
> read-only
> root=/dev/hdb9
> # restricted
> # alias=1
>
> # If you have another OS on this machine to boot, you
> can uncomment the
> # following lines, changing the device name on the
> `other' line to
> # where your other OS' partition is.
> #
> other=/dev/hdb1 #use if windows is installed on this
> harddrive b first partition
> #other=/dev/hda1 # use if you have windows on
> harddrive (device a) first partition
> label=windows
>
>
> ----------------------Ends before this line
> -----------------
>
>
> install the Master boot record and map files
> lilo -C /mnt/etc/lilo.conf
>
> you should see output
> Adding Linux2.6.10.5
> Adding windows
> with no errors
>
> check in /realboot for the new boot files
> ls -al /realboot/map
> ls -al /realboot/boot.0300
>
> if this is okay remove the cdrom
> umount /mnt
> umount /realboot
> reboot
>
> * steps for this change back to using /boot
> after initial linux boot is fixed:
>
> (needed later - after the first real boot)
> boot into linux
> su root
>
> apt-get install lilo (install lilo)
> it might ask about /etc/lilo.conf do not overwrite
> contents
>
> umount /realboot
> rmdir /realboot (not needed for next boot)
> mkdir /boot (if not already there from before)
> mount -t ext3 /dev/hda10 /boot
> edit /etc/fstab (change /dev/hda9 mount back to /boot)
> edit /etc/lilo.conf (change map=/boot/map)
> ( change image=/boot/vmlinuz-2.6.10.5)
> lilo -C /etc/lilo.conf (overwrites boot files this
> time in /boot)
> if no errors
> reboot
>
> can next install grub if you prefer this instead.
>
> thanks
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection
> around
> http://mail.yahoo.com
>
>
>
> Thanks again to everyone.
> ~Matt
--
Trent Lloyd <lathiat at bur.st>
Bur.st Networking Inc.
More information about the ubuntu-users
mailing list