PDA

View Full Version : Installing Fedora without a CD/DVD drive


Shaggy1
26th April 2010, 05:06 PM
Hi

I have a machine (acer aspire) without a CD or DVD drive. It came with no OS (or it was supposed to come with linux installed, but didn't) so I have installed puppy linux onto a USB drive and can now boot from that.

I now want to install fedora 12 and was wondering how I can do this without a CD/DVD drive.

Ideally I'd like to install it directly from .iso files loacted on the hard drive of the machine I want to install fedora to (so I can download the .iso files onto my hard drive and install directly - circumventing the need for a CD/DVD drive). Does anyone know if this is possible and where I might find the information describing how to do it ?

If this is not possible I guess the other way to do this is to install a live USB image and use the tools provided to install onto the hard disk. If this the only way to install without a CD drive I have a couple of questions regarding this method:
1) I have an external USB drive which already has data on it. Is it possible to install fedora without wiping all the existing data ? And if so how should the disk be partitioned ?
2) I think the live install uses various tools that do not come with puppy linux by default. Does anyone know if there is some information somewhere that says what tools are required and where they can be obtained from ?

kyryder
26th April 2010, 05:17 PM
Hello and Welcome to Fedoraforum.org,

There are a couple ways to do this that I know of. The first is to use grub or a image from http://boot.fedoraproject.org/faq (more info in the link).
You can also use dd to put the livecd to a usb drive. There would be no need for additional tools with this method but I believe you would lose any data on the usb drive.

There are probably other ways, so if you don't want to use the methods I mentioned post back and ask for more.:)

Hope this helps,

Ky

Adunaic
26th April 2010, 05:30 PM

Hi,

There are two ways: From the hard drive, but I think you need something installed first: http://docs.fedoraproject.org/install-guide/f12/en-US/html-single/#s1-begininstall-hd-x86

And from USB Pen, this works well.

http://forums.fedoraforum.org/showthread.php?t=205596.

filip007
27th April 2010, 07:26 PM
Why not Unetbootin?

stoat
27th April 2010, 08:21 PM
Ideally I'd like to install it directly from .iso files loacted on the hard drive of the machine I want to install fedora to (so I can download the .iso files onto my hard drive and install directly - circumventing the need for a CD/DVD drive). Does anyone know if this is possible and where I might find the information describing how to do it ?Yes.

Hello Shaggy1,

You need four files on the hard drive... vmlinuz
initrd.img
install.img
The ISO fileThe first three files in that list can be extracted from the ISO file, or they can be downloaded from the ~/os/isolinux and ~/os/images subfolders of the download server directory where you got the ISO file. I recommend that all of the files be copied to the root directory of a compatible hard drive partition (e.g., FAT32, ext2, ext3, not NTFS, not an LVM LV) that will not be formatted during the installation. The install.img file should be one directory level down from the other three in a subfolder named /images. When they're ready to go, the files in the compatible partition should look like this for the i386 Fedora 12 DVD, for example.../vmlinuz
/initrd.img
/Fedora-12-i386-DVD.iso
/images/install.imgNext, load and execute the kernel and initial ramdisk.

You can do that by any available means. GRUB4DOS (https://gna.org/projects/grub4dos/) can do it in Windows, or your Puppy Linux boot loader can do it. You would add menu commands to their config files. Example...title Install Fedora
kernel (hdx,y)/vmlinuz
initrd (hdx,y)/initrd.imgOr, stop your Puppy Linux boot menu at a grub> prompt and enter GRUB shell commands one at a time there. Example...
grub> kernel (hdx,y)/vmlinuz
grub> initrd (hdx,y)/initrd.img
grub> bootYou, of course, change x & y to the drive & partition with the four files. The installer starts (language, keyboard, installation method). For installation method, choose "Hard drive". Next is the prompt for the partition with the installation image. Choose it from the list. You can even guess at it. If you guess wrongly, you are only returned to the list. When you choose the correct partition, the familiar graphical Anaconda installer continues on per normal.

P.S.: For other readers, a Super Grub Disk (http://www.supergrubdisk.org/) can also boot to a grub> prompt (press "c" at the menu screen) from which the manual GRUB shell commands can be issued to boot vmlinuz and initrd.img to get the thing going. It's a handy emergency utility that everyone should possess anyway.

Shaggy1
6th May 2010, 10:38 PM
Hi

Thank you for your replies.

I attempted to use the instructions listed by stoat which is what I had in mind doing, but I am unable to get access to the bootloader in any way. I am not sure what boot loader is being used when I boot puppy, but it is not grub and I do not get any option to go to a boot prompt at startup.

Does anyone know how I can tell what bootloader is being used ?

I thought I should be able download grub and install it into the mbr of my usb drive, but have been unable to get hold of grub (I think I could build it, but I believe would need to install several tools to do so).

Does anyone know if there is some way I can get hold of grub (for puppy linux) without having to build it ?

Most of the other instructions I have seen seem to assume either a CD/DVD drive, some sort of boot tool/boot command line already available or fedora already installed (at least ability to get hold of and use tools like livecd-iso-to-disk).

I have now obtained a second usb stick and I got a set of instructions on the puppy forums tp try to create a bootable usb from the live iso file. The instructions I have followed are listed below:
""
1. Assuming that your flash drive is device sdb1, open a terminal and type
Code:
blkid /dev/sdb1
Write down the UUID value for your drive. It looks something like 4BD6-C4E0. Save this for Step 4.

2. Download the Fedora ISO and save it to the hard drive.

3. Follow the instructions here for transferring the ISO onto the flash drive:
The Linux version of UNetbootin won't run in Puppy because of missing dependencies. But it is sometimes possible to do the manual equivalent of UNetbootin to convert a Linux distro's ISO file into a bootable flash drive. Here are the steps:
1. Mount the flash drive and delete everything on it.
2. Unmount the flash drive but leave it plugged in.
3. Determine the device name of your flash drive. It may be sdb1.
4. Open a terminal and type:
Code:
syslinux /dev/sdXY
where XY is your flash drive. Make sure you get this right!
5. Mount the flash drive. You should see the file ldlinux.sys on it.
6. Click on the distro's ISO file to mount it. Copy everything off the ISO onto the flash drive. There may be some hidden files, so use the ROX eyeball icon to see them.
7. Does the ISO contain a folder named isolinux? It may be inside another folder named boot. If so, copy all the files in the isolinux folder to the root of the flash drive.
8. You should now see a file named isolinux.cfg at the root of the flash drive. Rename it to syslinux.cfg.
9. If you cannot find an isolinux.cfg file anywhere in the ISO, it may be using a different bootloader. In that case, your best bet is to manually create a file named syslinux.cfg with the following line
Code:
default /boot/vmlinuz initrd=/boot/initrd.gz vga=normal
10. Unmount everything and reboot off the flash drive.

4. The new file syslinux.cfg on your flash drive needs a modification. Open it in a text editor and locate Line 22, which starts:
Code:
append initrd=initrd0.img root=live:CDLABEL=Fedora-12-i686-Live....

Change it to:
Code:
append initrd=initrd0.img root=live:UUID=your_uuid....

5. Boot off your flash drive. The Fedora desktop has an icon for installing Fedora to a hard drive. Hopefully, it can take care of everything else.
""

When I try to boot from the generated usb stick I get the following message:
Could not find kernel image: linux
boot:

Does anyone have any idea what might be happening here ? Or know whether I can type something in at the prompt to tell it where the files it requires are ?

stoat
7th May 2010, 01:30 AM
I am not sure what boot loader is being used when I boot puppy, but it is not grub and I do not get any option to go to a boot prompt at startup.

Does anyone know how I can tell what bootloader is being used ?According to Puppy Linux documentation, it uses the GRUB boot loader. If you can boot the computer with Puppy Linux and see a boot menu, then press "c" while the menu is visible. That normally stops GRUB at a grub> prompt. From that, you do all of that other stuff to launch the Fedora installer and and install Fedora from the ISO file.

Shaggy1
12th May 2010, 09:31 PM
Hi

A little more playing about and I discovered that the puppy usb stick I created is using syslinux as a bootloader, not grub.

With a little more editing of syslinux.cfg I have managed to boot fedora from a usb stick by copying a live KDE .iso file.

Does anyone know if it is now possible for me to initiate an install to hard drive from the fedora desktop ?

Failing that is it possible to configure syslinux to load and execute the kernel from the hard drive in the same way as indicated by stoat for grub ? (I got the impression syslinux did not support cross drive installation, but I'm not sure)

Do I need to install grub somewhere before I install to hard disk ?

stoat
13th May 2010, 02:35 AM
Does anyone know if it is now possible for me to initiate an install to hard drive from the fedora desktop ?I don't. And if anyone knows how to do that, then I, for one, would like to learn about it.



Failing that is it possible to configure syslinux to load and execute the kernel from the hard drive in the same way as indicated by stoat for grub ?I've never done it, but it's not hard to find syslinux.cfg syntax examples with Google like just I did. No promises of course, but from what I just read, these lines in syslinux.cfg might launch the installer kernel and initial ramdisk from the syslinux boot loader...label Install Fedora
kernel /[full_path_to]/vmlinuz
append initrd=/[full_path_to]/initrd.img

Shaggy1
16th May 2010, 12:39 PM
> No promises of course, but from what I just read, these lines in syslinux.cfg might launch the installer kernel and initial ramdisk from the syslinux boot loader...

Indeed there is plenty of documentation on configuring syslinux, but what I cannot seem to find is how to specify a drive and partition - the equivalent of the (hdx,y) notation in grub.

I don't suppose there are any syslinux gurus out there who know whether specifying the drive/partition in syslinux is supported ? and if so haw to specify it ?

stoat
16th May 2010, 03:34 PM
Hello again Shaggy1,

Of course, continue with what you are doing with syslinux if you prefer that. But while you are waiting for replies to that, if the point of all of this is still merely to start the Fedora installation from the ISO file as already discussed, then don't forget that the Super Grub Disk comes in a version for pendrives. Its boot menu accepts the 'c' key to stop at a grub> prompt. And it's a handy thing to have around for emergencies anyway.

Example:

The files were in the root directory of /dev/sdb3 (a FAT32 hard drive partition). The file install.img was one level down in the /images folder. The Super Grub Disk was booted. The 'c' key was pressed. The kernel & initial ramdisk were located and booted (login to see the images that follow)...

http://forums.fedoraforum.org/attachment.php?attachmentid=19522&stc=1&d=1274020020

The familiar Anaconda installer started, and the installation method chosen was "Hard drive"...

http://forums.fedoraforum.org/attachment.php?attachmentid=19523&stc=1&d=1274020020

The partition with the ISO file was selected from the list. No directory entry was needed in the text box since the ISO file was in the root directory (the reason I always recommend that)..

http://forums.fedoraforum.org/attachment.php?attachmentid=19524&stc=1&d=1274020020

The graphic Anaconda pages started...

http://forums.fedoraforum.org/attachment.php?attachmentid=19525&stc=1&d=1274020020

Good luck with whatever you decide to do. If you end up using syslinux to do this, then you should return here to describe how it's done.

Shaggy1
17th May 2010, 09:48 PM
Thank you very much stoat for the information concerning Super Grub Disk - this looks like a very useful package, so I'll get another usb pen and install it.

Assuming that syslinux does not support installing from multiple disks/partitions I figured I would have to build grub from source, then install on a usb drive and give it the appropriate configuration.

Using the fedora I have on my usb stick I downloaded the grub source an started installing the tools required to build (bison, gcc etc). However while doing the installs my machine has completely locked up twice (something taking up 100% cpu I think) and crashed twice with a message something like:
firstboot: fatal IO error 11 (resource temporarily unavailable) on display :9
Anyone know how I might find out what is happening here ? Is this likely to be indicative of the flash drive failing ?

I did manage to download grub 0.97, but when I attmpted to build it I got an error:
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils
(it said it needed 2.9.1.0.23 or later - downloaded 2.19). Anyone know what I need to get to allow this to build ?

stoat
17th May 2010, 11:44 PM
What about putting vmlinuz, initrd.img, and install.img on the USB drive with Puppy and adding an entry to syslinux.cfg to launch the kernel from the Puppy menu (post #9)? Once the kernel is running, choose the partition with the ISO file from the list in Anaconda.

beaker_
18th May 2010, 12:02 AM
You're getting good advice and exposure to great tools. But you can make your life easier. You were able to install puppy onto a usb drive so do the same for either the net-install or live cd. You're NIC (ethernet card) is likely supported so updating and group-installing then becomes a 'yum' exercise.

Late Edit: Ooops, sorry I was skimming. I'd bet either your ISO was corrupt, your method didn't work as expected, or compatibility. When you're ready, try downloading both the net-install and live-cd ISO again and verify their checksum. Then jump to a Windows PC and format your pen as FAT if possible (that's FAT 16, older equipment sometimes stumble on FAT32) but may not be possible (volume). Download and install fedora's liveusb-creator (yes there is a Win version) and create your liveusb disk from there.

mwesten
18th May 2010, 04:06 AM
Hi,

My machines have CD drives, but I install from a flash drive so I don't need to burn a CD. The Fedora ISO is a hybrid-type, and will boot directly from a flash drive on most PCs. If your PC will boot from a flash drive, and you can write the the ISO on one, that would be the simplest method to start the live os and install it to the internal hard drive. Would that work for you?

kyryder
18th May 2010, 05:19 PM
Hello,

I used the boot image from http://boot.fedoraproject.org/index yesterday without issue. The install went very smooth. I did noticed they have changed some things since the last time I used that image.

Ky

Shaggy1
19th May 2010, 02:31 PM
Hi

Thanks again for the help on this.

Just to re-iterate: what I wanted to do (my inital goal) was to install fedora onto the hard drive.
(Having had the problems I have had I now also want to eventually create a usb stick with grub on it (which seems to allow configuration to install from anywhere), so I can use that to help me do any installs in the future.)

I have attempted to install a Live iso image onto a usb stick - and this seemed to work, but I came across problems (it crashed) when I tried installing stuff using yum.
I'll try doing this again, but from what I saw it was not possible to do an installation onto the hard drive from this.
mwesten wrote:
> If your PC will boot from a flash drive, and you can write the the ISO on one, that would be the simplest method to start the live os and install it to the internal hard drive. Would that work for you?
Do you know how to an install to hard drive once I have a live fedora on a usb stick ?

Thank you, stoat, for the advice on using the puppy syslinux menu to run the linux kernel - I guess that should work (though I've have to figure out how to get the menu options up in the first place).

---------- Post added at 05:31 AM CDT ---------- Previous post was at 03:53 AM CDT ----------

Hello,

I used the boot image from http://boot.fedoraproject.org/index yesterday without issue. The install went very smooth. I did noticed they have changed some things since the last time I used that image.

Ky

Hi
Yes booting across the network is another option (this also looks like a handy tool). I was avoiding it because I was worried my internet connection is too slow. Do you know how fast it needs to be for a reasonable installation time ? My connection is supposed to be 2M (I haven't measured the speed, but I'm guessing if they say it's 2M it often isn't unless you shout about it)

mwesten
19th May 2010, 04:44 PM
Okay. When you burn the ISO to a CD and boot it, Fedora "Live System User" will start, and it will have an icon called "Install to Hard Drive" right on the desktop. This is what you want, except that you want it do that from a USB stick.

To make that happen, you follow the instructions for "Using dd for a direct copy" in the USBHowTo.

https://fedoraproject.org/wiki/FedoraLiveCD/USBHowTo#Using_dd_for_a_direct_copy

On a linux box, it's one command:

dd if=F12-Live-i686.iso of=/dev/sdX bs=8M

Just change the device name "/dev/sdX" to the correct one for your stick (i.e. /dev/sda).

That's it. When done, you just reboot FROM the stick. It will come up just as it does from CD and you'll be able to click the icon and install to the hard disk.

If you need or want to do this from Windows, there's a way to do that too.

The stick will be overwritten, so don't use one which has files you want to keep on it.

Also, be careful to get the stick's device name correct, or you will be overwriting something else instead.

kyryder
19th May 2010, 05:29 PM
Hi

Thanks again for the help on this.


Hi
Yes booting across the network is another option (this also looks like a handy tool). I was avoiding it because I was worried my internet connection is too slow. Do you know how fast it needs to be for a reasonable installation time ? My connection is supposed to be 2M (I haven't measured the speed, but I'm guessing if they say it's 2M it often isn't unless you shout about it)

Hello,
I would think it would work, the speed of the your connection would determine the amount of time it would take, but it still should work. I didn't time the install i did, but if you end up installing this way be sure to post back the results.

Ky

Shaggy1
26th July 2010, 09:55 PM
Hi

A combination of illness and holiday has had me off line for a while, but I just wanted to thank you for the help and advice on installation problems I have been having.
I eventually (after a few hiccups) managed to get fedora installed by editing syslinux.cfg to provide an option to install fedora and then directed Ananconder to use the iso image I had on teh hard drive as suggested by stoat.

(I did accidently put the boot loader onto the usb stick rather than the hard drive, but I guess that now it will be fairly simple to put grub onto the MBR of the hard drive if I wish to do it)