Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I've been trying to run Fedora on my USB HDD for quiet a long time now and still couldn't succeed. Here is what i did:
I first installed fedora on my USB HDD. There are three partitions on the usb hdd, two being ntfs. I installed fedora to the third partition which fedora recognizes as sdb1,3,4 (boot,root,swap). On boot loader configuration, ichanged the drive order and made sdb first drive, and installed grub to /dev/sdb1. i completed the installation. Checked my grub.conf file. everything looks ok. device.map says (hd0) is /dev/sdb and that is what i see on grub.conf. So everything seems ok.
When I reboot my PC and edit bios settings to boot from usb hdd, it loads grub. But in stead of the familiar grub screen, a command screen pops up saying "minimal bash-like editing supported etc.etc. etc. .... grub>". I tried to boot linux manually by typing boot and it says "kernel must beloaded first". Then i type "kernel (hd0,0)/vm->TAB" and it loads the kernel. Then i say boot and it reboots the pc and everything starts from the beginning. Please share with me if you know what to do and help me out. Thanks.
But in stead of the familiar grub screen, a command screen pops up saying "minimal bash-like editing supported etc.etc. etc. .... grub>".
I think it is not finding your grub.conf file. When it puts you at the grub prompt, try typing
find /grub/grub.conf
This will search all of your partitions for this file. Also note that on some installations the configuration file is called menu.lst rather than grub.conf. I have read that the older RHs made menu.lst a symlink to grub.conf.
Quote:
I tried to boot linux manually by typing boot and it says "kernel must beloaded first". Then i type "kernel (hd0,0)/vm->TAB" and it loads the kernel. Then i say boot and it reboots the pc and everything starts from the beginning.
I think you probably need to specify an initrd, and maybe some other things to get a proper boot. You can use grub.conf as a guide.
I think it is not finding your grub.conf file. When it puts you at the grub prompt, try typing
find /grub/grub.conf
This will search all of your partitions for this file. Also note that on some installations the configuration file is called menu.lst rather than grub.conf. I have read that the older RHs made menu.lst a symlink to grub.conf.
I think you probably need to specify an initrd, and maybe some other things to get a proper boot. You can use grub.conf as a guide.
Thanks a lot for your reply. well i think you are right about my problem. i did as you say (find) and it returns nothing. my usb hdd is (hd0) and when i say for example "find /initrd-2.1.blabla" it finds the initrd. and it does find the kernel and everything else in the boot directory. But when i try to find something in /grub/, it doesn't. It just behaves like grub folder is not there. But i know it is. I ran grub-install again and the result didn't change. Any ideas?
and for the second part, i entered all boot parameters manually. just like in grub.conf:
>root (hd0,0)
>kernel /vmlinuz-.... ro root=/dev/Vol.....
>initrd /initrd-2.....
>boot
and it just reboots the computer and everything starts from the beginning. Am i doing something wrong? any ideas now?
well i am having more trouble now. a few reboots later i lost the grub command line also and just get a "GRUB _". so i reinstalled fedora and did everything exactly the same. now i can't even load the kernel. when i try to load i get an error 13. in grub manual it says:
"13 : Invalid or unsupported executable format
This error is returned if the kernel image being loaded is not recognized as Multiboot or one of the supported native formats (Linux zImage or bzImage, FreeBSD, or NetBSD)."
but i couldn't find what to do about it. Please somebody help!
There are three partitions on the usb hdd, two being ntfs. I installed fedora to the third partition which fedora recognizes as sdb1,3,4 (boot,root,swap). On boot loader configuration, ichanged the drive order and made sdb first drive, and installed grub to /dev/sdb1. i completed the installation.
First, the 3rd partition would not be identified as "sdb1,3,4". It is not clear from this what partitions you now have. Can you boot from the Fedora CD and run "fdisk -l".
Second, what is booting this system? What bootloader is in the MBR of the first drive? (If you put GRUB in sdb1, then it is in the boot sector of that partition, and not in the MBR---there always must be boot code on the MBR of the first drive (or on a floppy))
First, the 3rd partition would not be identified as "sdb1,3,4". It is not clear from this what partitions you now have. Can you boot from the Fedora CD and run "fdisk -l".
Second, what is booting this system? What bootloader is in the MBR of the first drive? (If you put GRUB in sdb1, then it is in the boot sector of that partition, and not in the MBR---there always must be boot code on the MBR of the first drive (or on a floppy))
i only have windows running now so i cant copy the fdisk -l output but i'll write what it says. My hdd is 500 GB and there are 2 ntfs partitions on it also. There is /dev/sdb1 which is /boot, /dev/sdb2 is an extended volume (i guess it is called so) which holds 2 ntfs partitions (i am certain with this) and doesn't bother me right now. And /dev/sdb3 is root partition (/). On sda there is no bootloader. i installed grub to /dev/sdb. That is how i do it: on installation fedora asks me where i want grub loaded. I check "configure advanced bootloader options" box. So it asks me if i want to load it to /dev/sda (MBR) or /dev/sdb1 (first sector of the boot partition). I change the drive order and move my usb hdd to first place. and then the list changes to /dev/sdb (MBR) or /dev/sdb1 (first sector of the boot partition). I choose the first option (/dev/sdb (MBR)) and proceed with the installation. And get the issues i mentioned above. Choosing the second option (/dev/sdb1) doesn't change the result.
i am quiet a newbie and don't really know what inforation to give. please guide me with this. thanks
Can you boot up from the Fedora CD? Go into a terminal and look at the contents of the drive.
first, to verify the partition references: fdisk -l
Then, to look at the "/boot" partition (what you called sdb1), look in /mnt (cd /mnt) to see if a mount point is already there. If not: mkdir fedora
mount /dev/sdb1 fedora
cd fedora
ls
you should see a grub directory cd grub
look for a file named "menu.lst" or "grub.conf" Tell us what is in the first entry that looks something like this:
Code:
title Fedora7
root (hd0,9)
kernel /boot/vmlinuz root=/dev/sda10
initrd /boot/initrd
boot
(Don't post anything starting with "#"--those lines are comments
Finally, this is bugging me:
Quote:
So it asks me if i want to load it to /dev/sda (MBR) or /dev/sdb1 (first sector of the boot partition). I change the drive order and move my usb hdd to first place. and then the list changes to /dev/sdb (MBR) or /dev/sdb1 (first sector of the boot partition). I choose the first option (/dev/sdb (MBR)) and proceed with the installation.
If you change the drive order before attempting to install, then the Fedora installer should report that drive as sda. Your post seems to be saying that you somehow changed the order DURING the Fedora install???
Finally, how about putting GRUB on the first (internal?) drive? (The one that was appearing as sda before you switched the order)
i've installed fedora core 6 while waiting and everything i said before is still the same. only sda became hda and sdb became sda. Below is what you asked.
here it is:
Code:
>fdisk -l
Disk /dev/hda: 80.0 GB .....................
...
Device Boot ......... Id ...... System
/dev/hda1 * 7 HPFS/NTFS
/dev/hda4 f W95 Ext'd (LBA)
/dev/hda5 7 HPFS/NTFS
Disk /dev/sda : 500.1 GB .....................
...
Device Boot ......... Id ...... System
/dev/sda1 * 83 Linux
/dev/sda2 f W95 Ext'd (LBA)
/dev/sda3 8e Linux LVM
/dev/sda4 (i forgot what it says here, will look if you ask (must be swap))
/dev/sda5 7 HPFS/NTFS
/dev/sda6 7 HPFS/NTFS
>df
Filesystem ..........................................mounted on
/dev/VolGroup00/LogVol00
/
/dev/sda1 /boot
>vi device.map
(hd1) /dev/hda
(hd0) /dev/sda
>vi grub.conf
default = 0
timeout = 5
splashimage = (hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6..... ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.....
i need this to work in diffrent computers so i need the bootloader to be on the usb disk. And for what you asked: i didn't do anything diffrent. I just followed the installation steps. And when it is asked, i did as i said before. With fedora core 6, internal hdd is hda and usb disk is sda. I hope i did gave enough information. Thanks again for your time.
The only thing I can think of is that GRUB is getting installed pointing to the wrong partition. I think this will happen if you change the boot order after installing GRUB.
Try this:
Set the BIOS to boot the Linux drive
Boot from the live CD, go to a terminal and open a GRUB shell like so: grub
geometry (hd0)
geometry (hd1) (These will show which drive (in grub-speak) has the Linux installation. Assuming the BIOS is set to boot the Linux drive, it should show up as hd0)
THEN: root (hdX,Y) X and Y are the drive and partition numbers for the partition where /boot is--eg hd0,0 for the first partition of the first drive--grub counts form zero setup (hd0) Installs grub to the mbr of the drive that GRUB sees as #1
#grub
grub>geometry (hd0)
drive 0x80: C......,/dev/hda
partition num: 0 , Filesystem type unknown, partition type 0x7
....
grub>geometry (hd1)
drive 0x80: C......,/dev/sda
partition num: 0 , Filesystem type is ext2fs, partition type 0x83
partition num: 2 , Filesystem type unknown, partition type 0x8e
partition num: 4 , Filesystem type unknown, partition type 0x7
partition num: 5 , Filesystem type unknown, partition type 0x7
grub> setup (hd1)
everything goes "ok", i reboot my PC and get an error 2 which is "2 : Bad file or directory type
This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO." according to GRUB manual. I think that is the same problem I had before.
When I make grub find anything in the /boot/grub directory, it doesn't. It finds everything in the /boot directory, but not /boot/grub. I can navigate to /boot/grub directory and open and view everything in it, but grub says it isn't there. I think this causes the problem. Do you know why this happens?
I think the problem of /boot/grub and /grub is Red Hat-related. This distro family, which Fedora belongs, tries very hard to sell LVM to every user.
A LVM is not recognised by any Linux boot loader and so a Red Hat distro, in pushing hard for the LVM, has to create a different partition for /boot in Type 83 with a filing system both Lilo and Grub can read.
Thus inisde a Red Hat distro the filing tree is complete with /boot, /root, /home etc but its /boot is on a separate partition which must be mounted. When Grub reads /boot as a separate partition it can only find /grub because the kernel has not been loaded and so the /boot has not been mounted by /etc/fstab.
Hope the above explains the confusion of /boot/grub in Linux and /grub in Grub prompt.
If a Red Hat user doesn't want the complication of a LVM all he/she needs to do is to give only one partition for its installation. That will force the installer to install every directory inside it as a normal Linux.
I think the problem of /boot/grub and /grub is Red Hat-related. This distro family, which Fedora belongs, tries very hard to sell LVM to every user.
A LVM is not recognised by any Linux boot loader and so a Red Hat distro, in pushing hard for the LVM, has to create a different partition for /boot in Type 83 with a filing system both Lilo and Grub can read.
Thus inisde a Red Hat distro the filing tree is complete with /boot, /root, /home etc but its /boot is on a separate partition which must be mounted. When Grub reads /boot as a separate partition it can only find /grub because the kernel has not been loaded and so the /boot has not been mounted by /etc/fstab.
Hope the above explains the confusion of /boot/grub in Linux and /grub in Grub prompt.
If a Red Hat user doesn't want the complication of a LVM all he/she needs to do is to give only one partition for its installation. That will force the installer to install every directory inside it as a normal Linux.
thanks. so you say i should make only one root partition and nothing else? no swap either?
On record I have installed every of my Linux in a single partition, Red Hat 9 and Fc2 to FC6 included.
Red Hat is server-orientated distro and multiple partitions may be useful to the administrator who wants to play tunes with the read/write access for the users.
For a desktop machine you will find single partition Linux is easier to boot, to maintain, to diagnose, to resize and ultimately to migrate.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.