Install Linux via second computer - Portable

This is a discussion on Install Linux via second computer - Portable ; Hi. I have a problem in that my laptop has no operating system on it, and it's CD drive is broken. Also, it can't boot from USB. So basically, I have to find some way of putting an OS on ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Install Linux via second computer

  1. Install Linux via second computer

    Hi. I have a problem in that my laptop has no operating system on it,
    and it's CD drive is broken. Also, it can't boot from USB. So
    basically, I have to find some way of putting an OS on the hard drive
    that finds out the hardware dependencies on the fly. I have a 2.5"
    enclosure so I can put anything on the hard drive. I thought about
    installing Slax to a USB key and copying the files over, but that was a
    disaster. So, is there any way for me to take one computer, install a
    linux OS onto an external HD that is hardware-independent, put that
    hard drive into a laptop, and have the laptop boot without a system
    disk? And if the reason I can't do that is because I need a system
    disk, where do I look for the boot disk? Thanks.


  2. Re: Install Linux via second computer

    Syed Ashrafulla wrote:
    > Hi. I have a problem in that my laptop has no operating system on it,
    > and it's CD drive is broken. Also, it can't boot from USB. So
    > basically, I have to find some way of putting an OS on the hard drive
    > that finds out the hardware dependencies on the fly. I have a 2.5"
    > enclosure so I can put anything on the hard drive. I thought about
    > installing Slax to a USB key and copying the files over, but that was a
    > disaster. So, is there any way for me to take one computer, install a
    > linux OS onto an external HD that is hardware-independent, put that
    > hard drive into a laptop, and have the laptop boot without a system
    > disk? And if the reason I can't do that is because I need a system
    > disk, where do I look for the boot disk? Thanks.


    I've done this sort of thing in the past (though not on a laptop). If
    the hard drive is on a generic IDE interface, you can often get away
    with copying an existing system and

    - setting the run level to 3 (so that X isn't started)
    - modifying modprobe.conf/modules.conf to take out modules for
    non-existent hardware
    - maybe rebuilding the initrd file
    - writing the boot block using grub (I'm not a grub expert, but I assume
    it can be done, no graphics of course)

    and then just stuffing the disk in and booting. This gets you a system
    with generic VGA command line access, and you can then start fixing it
    up to make X work etc.

    If you can borrow another laptop with hardware that's close, you can do
    the install there, set the run level to 3, move the disk and boot. If
    you forget to set the run level, you just have to wait until the boot-up
    gets tired of loading X and having it tank.

    Getting X to work can be tough. Make google your friend, and if that
    doesn't work ask for help.

  3. Re: Install Linux via second computer

    Allen McIntosh writes:

    >Syed Ashrafulla wrote:
    >> Hi. I have a problem in that my laptop has no operating system on it,
    >> and it's CD drive is broken. Also, it can't boot from USB. So
    >> basically, I have to find some way of putting an OS on the hard drive
    >> that finds out the hardware dependencies on the fly. I have a 2.5"
    >> enclosure so I can put anything on the hard drive. I thought about
    >> installing Slax to a USB key and copying the files over, but that was a
    >> disaster. So, is there any way for me to take one computer, install a
    >> linux OS onto an external HD that is hardware-independent, put that
    >> hard drive into a laptop, and have the laptop boot without a system
    >> disk? And if the reason I can't do that is because I need a system
    >> disk, where do I look for the boot disk? Thanks.


    The problem is booting. You could certainly install onto that disk. Just
    tell the installer of you favourite distro to install onto that disk. Also
    tell it to put the bootloader onto that disk. The big problem is that the
    bootloader is going to think that this disk is drive X while it is actually
    /dev/hda in the laptop. Thus the bootloader will look in the wrong disk
    for the file to load into the memory to start loading vmlinux.
    Now if somehow you could make the disk into /dev/hda on the system onto
    which you are going to be installing, everything would work, but I do not
    know how to do that.


    >I've done this sort of thing in the past (though not on a laptop). If
    >the hard drive is on a generic IDE interface, you can often get away
    >with copying an existing system and


    HOw will he copy it? In particular how to copy the bootloader?


    >- setting the run level to 3 (so that X isn't started)
    >- modifying modprobe.conf/modules.conf to take out modules for
    >non-existent hardware
    >- maybe rebuilding the initrd file
    >- writing the boot block using grub (I'm not a grub expert, but I assume
    >it can be done, no graphics of course)


    That is the problem. I have no idea how to write the MBR to tell the system
    to act as if this were the first drive.


    >and then just stuffing the disk in and booting. This gets you a system
    >with generic VGA command line access, and you can then start fixing it
    >up to make X work etc.


    Once he gets anything he is away to the races.



  4. Re: Install Linux via second computer

    "Syed Ashrafulla" writes:
    > disaster. So, is there any way for me to take one computer, install a
    > linux OS onto an external HD that is hardware-independent, put that
    > hard drive into a laptop, and have the laptop boot without a system
    > disk?


    I've moved HD's with Red Hat and Fedora distros installed on them from
    one computer to another when the hardware wasn't the same. Kudzu (the
    auto-configuration program) figures out the hardware changes and makes
    appropriate adjustments. You get a bunch of dialogs saying things
    like "Kudzu has found new hardware".

  5. Re: Install Linux via second computer

    Syed Ashrafulla wrote:
    > Hi. I have a problem in that my laptop has no operating system on it,
    > and it's CD drive is broken. Also, it can't boot from USB.


    Can it boot PXE over a network? Usually a BIOS which is recent
    enough has such client built-in. This assumes an existing
    network interface your BIOS is aware of.

    > So basically, I have to find some way of putting an OS on the hard
    > drive that finds out the hardware dependencies on the fly.


    That is, in principle, what your installer does although it puts
    OS not on a hard drive but into memory. :-)

    > So, is there any way for me to take one computer, install a
    > linux OS onto an external HD that is hardware-independent, put that
    > hard drive into a laptop, and have the laptop boot without a system
    > disk?


    If both machines are of the same architecture then the answer
    is basically yes but there are all these niggling details.
    Distributions usually have all files you need to turn the other
    machine into a PXE server so if you can boot that way it can
    be simpler. Then even architectures do not need to be the
    same but a network between two machines needs to exist on
    a physical level.

    Release notes for your distro likely have some explanation
    about details of such boot.

    Michal

  6. Re: Install Linux via second computer

    "Syed Ashrafulla"
    > and it's CD drive is broken. Also, it can't boot from USB. So
    > basically, I have to find some way of putting an OS on the hard drive


    hi!

    why not buy a new CD drive?
    they come cheap these days!!!

    cheers,
    christine



  7. Re: Install Linux via second computer

    Unruh wrote:
    > Allen McIntosh writes:
    >> Syed Ashrafulla wrote:
    >>> Hi. I have a problem in that my laptop has no operating system on it,
    >>> and it's CD drive is broken. Also, it can't boot from USB. So
    >>> basically, I have to find some way of putting an OS on the hard drive
    >>> that finds out the hardware dependencies on the fly. I have a 2.5"
    >>> enclosure so I can put anything on the hard drive. I thought about
    >>> installing Slax to a USB key and copying the files over, but that was a
    >>> disaster. So, is there any way for me to take one computer, install a
    >>> linux OS onto an external HD that is hardware-independent, put that
    >>> hard drive into a laptop, and have the laptop boot without a system
    >>> disk? And if the reason I can't do that is because I need a system
    >>> disk, where do I look for the boot disk? Thanks.

    > The problem is booting. You could certainly install onto that disk. Just
    > tell the installer of you favourite distro to install onto that disk.


    Copying a working system is probably faster than doing an install, and
    you get the advantage of updates and customization. There is something
    to be said for starting clean, too. This really reduces to personal
    preference - there is no "right" answer.

    >> I've done this sort of thing in the past (though not on a laptop). If
    >> the hard drive is on a generic IDE interface, you can often get away
    >> with copying an existing system and

    > How will he copy it?


    Other than the boot loader? Cpio, cp -r, tar, ... pick your favorite
    copying program.

    > In particular how to copy the bootloader?


    I'm not a grub expert, but my take on this is
    - fix grub.conf. Make sure that the definitions of splashimage, root,
    and initrd are correct. Turn off all the graphical boot stuff.
    - (the fuzzy part) Read the grub documentation carefully. Run grub by
    hand. Move disk, boot & live happily ever after :-)

    > Once he gets anything he is away to the races.


    Yes. Makes the "borrow a similar laptop" alternative look attractive.

  8. Re: Install Linux via second computer

    Syed Ashrafulla wrote:

    > Hi. I have a problem in that my laptop has no operating system on it,
    > and it's CD drive is broken. Also, it can't boot from USB. So
    > basically, I have to find some way of putting an OS on the hard drive
    > that finds out the hardware dependencies on the fly. I have a 2.5"
    > enclosure so I can put anything on the hard drive. I thought about
    > installing Slax to a USB key and copying the files over, but that was a
    > disaster. So, is there any way for me to take one computer, install a
    > linux OS onto an external HD that is hardware-independent, put that
    > hard drive into a laptop, and have the laptop boot without a system
    > disk? And if the reason I can't do that is because I need a system
    > disk, where do I look for the boot disk? Thanks.


    I think the instructions in

    will probably work, with a bit of luck.
    As others suggested, I would run in text mode
    (change "id:5:initdefault:" in /etc/inittab to "id:3:initdefault:"
    on the new disk).

    Incidentally, do you have a floppy drive?
    If so, there would be several other options
    as you would find if you google for "linux boot floppy"
    or "damn small linux floppy".


    --
    Timothy Murphy
    e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
    tel: +353-86-2336090, +353-1-2842366
    s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

  9. Re: Install Linux via second computer

    Timothy Murphy wrote:
    > Syed Ashrafulla wrote:
    >
    >> Hi. I have a problem in that my laptop has no operating system on it,
    >> and it's CD drive is broken. Also, it can't boot from USB. So
    >> basically, I have to find some way of putting an OS on the hard drive
    >> that finds out the hardware dependencies on the fly. I have a 2.5"
    >> enclosure so I can put anything on the hard drive. I thought about
    >> installing Slax to a USB key and copying the files over, but that was a
    >> disaster. So, is there any way for me to take one computer, install a
    >> linux OS onto an external HD that is hardware-independent, put that
    >> hard drive into a laptop, and have the laptop boot without a system
    >> disk? And if the reason I can't do that is because I need a system
    >> disk, where do I look for the boot disk? Thanks.

    >
    > I think the instructions in
    >
    > will probably work, with a bit of luck.
    > As others suggested, I would run in text mode
    > (change "id:5:initdefault:" in /etc/inittab to "id:3:initdefault:"
    > on the new disk).
    >
    > Incidentally, do you have a floppy drive?
    > If so, there would be several other options
    > as you would find if you google for "linux boot floppy"
    > or "damn small linux floppy".
    >
    >

    Btw, I would also try PicoBSD, compare, convinced me.

    You can install FreeBSD very easily via PLIP from another computer, if
    you have a floppy drive, comes with two bootfloppys...


    H.

+ Reply to Thread