Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I installed redhat9.0 on hda12, hda13 is its boot paration, grub is at mbr.
I don't want to give the booting files a whole partition now, how to change the booting files to /hda12/boot directory?
I copyed all the files in /hda13 to /hda12/boot directory, and modify /etc/fstab and /gurb/gurb.conf, but it failed.
Could someone know this?
Thank you.
Last edited by Xiangbuilder; 10-20-2003 at 12:51 AM.
It should just be a matter of making /boot on hda12 -- like you did
Then reconfigure fstab, like you said -- and change grub.conf to reflect the changes.
Here is the error information when the machine is starting up:
root (hd0,11)/boot
FIlesystem type is ext2fs, partition type 0x83
kernel /boot/vmliuz-2.4.20-8 ro root=/dev/hda10
initrd /boot/initrd-2.4.20-8.img
Error 15: FIle not found
Here is my manipulation:
In /grub/grub.conf, modify
root (hd0,12) to root (hd0,11)/boot,
In /etc/fstab,
delete the line:
LABEL=/boot /boot ext3 defaults 1 2
I successfully chnaged the boot partition from hda13 to hda9, but I don't know what is my mistake when I try to change modify it to a directory.
I modified it to
root (hd0,11)
kernel /boot/vmliuz-2.4.20-8 ro root=/dev/hda12
initrd /boot/initrd-2.4.20-8.img
root (hd0,11)
kernel /boot/vmliuz-2.4.20-8 ro root=/dev/hda12
initrd /boot/initrd-2.4.20-8.img
FIlesystem type is ext2fs, partition type 0x83
Error 15: FIle not found
still occur.
Last edited by Xiangbuilder; 10-20-2003 at 08:05 AM.
open teminal type su and root password and then grub
prompt changes to grub>
root (hd0,11) #comment set root for /boot folder
setup #comment put grub into mbr or reload to mbr assuming correct /etc/fstab file
kernel /boot/vmlinuz
initrd /boot/initrd.img
boot
(quits grub command editor)
DIFFERences
spelling of vmlinuz, no mention of read only, no NEED to specify root path as its already done by the ROOT command
and no other stuff in commands.
try that and if it does not work, go to su and type /sbin/lilo to try lilo as a bootloader. Assuming you got /etc/fstab correct as per your first message.
If I reinstall the grub, I think it must boot the machine.
However, if I don't reinstall the grub and the operating system, I guess I can change the booting files from one partition to another, but I can't change them from one partition to another partition's boot directory. It is my guess, I am not sure about it.
I think if I install grub on mbr and mount a partition, such as /hda13 to the root partition (that is, /) by the mount point, /boot, then, at the booting time, the booting information in mbr will point to /hda13 and find grub/grub.conf (so I have never dared to delete /grub/grub.conf in /hda13), and then, the file grub.conf will find which partition the booting file locate.
I guess there are some other diffrences between the installation, installing the booting files in a single partition and the installation, installing the booting files in root partition's boot directory. A guess too. If no, I think I can achieve it, I posted in the first post.
1) "oops I should read more carefully, /boot is on /dev/hda13 yes?
so replace the root command with
root (hd0,12)"
At the beginning, boot partition is /dev/hda13, I want change the booting files within it to the /dev/hda12/boot directory.
2) "what do you mean, by saying you don't want to delete /boot on /dev/hda13?
Does that mean you have not added entries to grub for the other boot ups for your windows stuff?"
If I don't reinstall grub or the operating system, I think I can't delete some files in /dev/hda13, such as /grub/grub.conf, because MBR will still find these files in /dev/hda13 as before, this can't be changed. However, I can delete some other files in /dev/hda13, such as initrd-2.4.20-8.img and so on. And my trouble is booting for linux instead of Microsoft windows.
Thank you for discussing my problem, your post is helpful to me. Thank you.
Last edited by Xiangbuilder; 10-20-2003 at 11:46 PM.
post your /boot/messages text file, it shows how grub boots AND post your /etc/lilo.conf (text file) which shows how lilo would do it if ENABLED.
I am still confused on what you mean by /boot and its partitions but if you have booted, ..... the grub file should show me or others.
its not entirely clear in my mind if you meant that you copied all of boot to another partiton because that would mean you have a directory that has /boot /boot /etc /home and so on. (your first post on copying etc)
So to make it explicit can you also write down all directories from root, the command cd / && ls should do it
to be sure of your partitions I need this as well in case /etc/fstab is wrong
commands and press enter
su
(when prompted) your password for root
fdisk /dev/hda
You may get a message about cylinder 1024, and whether you do or not then type m for the menu
p (to print table) this is what you will post
q (to quit fdisk without modify
post your /boot/messages text file, it shows how grub boots
There is file /boot/message without extension, I can't see its content, sorry.
Quote:
AND post your /etc/lilo.conf (text file) which shows how lilo would do it if ENABLED.
There isn't the file, /etc/lilo.conf.
Quote:
the grub file should show me or others.
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,12)
# kernel /vmlinuz-version ro root=/dev/hda12
# initrd /initrd-version.img
#boot=/dev/hda13
default=0
timeout=10
splashimage=(hd0,12)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,11)
kernel /vmlinuz-2.4.20-8 ro root=/dev/hda12
initrd /initrd-2.4.20-8.img
title Red Flag Linux (2.4.20-8)
root (hd0,8)
kernel /vmlinuz-2.4.20-8 ro root=/dev/hda11 vga=785 console=/dev/null CONSOLE=/dev/tty2 acpi=off
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1
Quote:
So to make it explicit can you also write down all directories from root, the command cd / && ls should do it
Code:
[root@localhost /]# ls -a
. etc lost+found rootistream.html
.. free misc rootostream.html
.autofsck ghostliness mnt sbin
bin hda10 opt tmp
boot hda11 proc usb
cede hda9 .recycled usr
defect home root var
dev initrd rootios.html xiang
equilibrium lib rootiostream.html
[root@localhost /]#
[root@localhost /]# fdisk /dev/hda
The number of cylinders for this disk is set to 4866.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 394 3164773+ b Win95 FAT32
/dev/hda2 395 4866 35921340 f Win95 Ext'd (LBA)
/dev/hda5 395 788 3164773+ 7 HPFS/NTFS
/dev/hda6 789 1182 3164773+ b Win95 FAT32
/dev/hda7 1183 1970 6329578+ b Win95 FAT32
/dev/hda8 1971 2758 6329578+ b Win95 FAT32
/dev/hda9 2759 3152 3164773+ 83 Linux
/dev/hda10 3153 3546 3164773+ 83 Linux
/dev/hda11 3547 3940 3164773+ 83 Linux
/dev/hda12 3941 4822 7084633+ 83 Linux
/dev/hda13 4823 4834 96358+ 83 Linux
/dev/hda14 4835 4866 257008+ 82 Linux swap
Command (m for help): q
[root@localhost /]#
Quote:
I am still confused on what you mean by /boot and its partitions but if you have booted,
Sorry, I don't explain my meaning enough exactly, I try to explain again, hope my words could be clearer than before this time.
When we install a linux operating system, I say, I have two design for it,
design one:
give a single partition for the os, when the installation finished, I get result one;
design two:
don't give a single partition for the os. when the installation finished, I get result two.
At the beginning, I use design one to install the os and get result one,
my question is:
If I don't reinstall grub, mbr, and os, could I convert result one to result two?
Sorry for my poor English, thank you.
Last edited by Xiangbuilder; 10-22-2003 at 09:25 PM.
If I read you correctly, you are actually trying to find the partition setups for your system whlle still dual booting.
b4 we go any further I STRONGLY recommend you consider an imaging linux program, it can image win95 don't know if it can do the nt stuff.
find it here www.partimage.org
has online dox and can use cd burners.
So I want you to take an image of each partition for which partimage works using the floppy system or the cd bootable system.
Then we can rebuild your computer any way you like, because when you read grub doc and this grub file http://www.wlug.org.nz/HowToLinuxWin9xGrubHOWTO
you can install win95/98 on a non-drive 1 partition 1. heh heh heh.
if the above dox are too hard for you we will fall back to a lighter choice, eh?
COMMENTS ON YOUR FILES POSTED
1) lilo conf file not found as you have not attempted to run the command
/sbin/lilo. Your choice, lilo is easier for beginners tho.
2) grub mistakes spotted so far
a) /dev/hda5 appears unbootable from grub, grub can find the chainloader from selecting dos but appears to load a win 95 on hda1 only
b) you will need it use keep grub to add another option to load hda5
c) FIRST rh boot is for hda12 needs /boot folder, assuming you have actually rebooted using hda12 it suggests you have no /boot directory on this partition but instead have vmlinuz and the initrd file immediately below hda12. Now i am likely to be wrong here MDk uses /boot/vm etc but your first install comments after # for RH suggest you can get away without the /boot so I don't know. Can't help.
YOU COULD try root (hd0,11)/boot if you are to miss out the /boot folder structure b4 vmlinuz or initrd.
d) SECOND rh boot not logical, root command says (0,8) = dev/hda9 whereas you claim its hda11. Modify this to match where you know you installed it.
e) Getting back to grub comments on how it was first installed, assuming it worked, your system defined the /boot directory as being on /dev/hda13 I am unfamilar with this command.
f) staying with those comments, it looks like /boot directory was and/or is installed on hda12. YET THAT seems to conflict with your first post. aaahhhh.
g) Can not comment on your directories as such, but at least you have a /boot directory.
h) its not entirely clear to me if you can boot into any linux, are you typing away merrily on windows?
Your use of the word DESIGN make me think you are testing, so if i am wrong sorry.
LILO will only work off a correct /etc/fstab file, assuming it is correct I would recommend the softest option is to make boot disks with lilo, RH dox should tell you how then modify your grub as per my hints
a) /dev/hda5 appears unbootable from grub, grub can find the chainloader from selecting dos but appears to load a win 95 on hda1 only
b) you will need it use keep grub to add another option to load hda5
Windows xp is installed on /hda5 and it can be boot well.
Quote:
d) SECOND rh boot not logical, root command says (0,8) = dev/hda9 whereas you claim its hda11. Modify this to match where you know you installed it.
No,
Code:
title Red Flag Linux (2.4.20-8)
root (hd0,8)
kernel /vmlinuz-2.4.20-8 ro root=/dev/hda11 vga=785 console=/dev/null CONSOLE=/dev/tty2 acpi=off
initrd /initrd-2.4.20-8.img
This title is for Red Flag instead of Red Hat, Red Flag is another Linux distribution that is developed by Chinese.
It can be boot at least as well as Windows xp that is on /hda5.
Quote:
f) staying with those comments, it looks like /boot directory was and/or is installed on hda12. YET THAT seems to conflict with your first post. aaahhhh.
I am not sure what are "those comments" you mean. If you mean the line is red, I will explain it for you in my forward post.
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,12)
# kernel /vmlinuz-version ro root=/dev/hda12
# initrd /initrd-version.img
#boot=/dev/hda13
Quote:
g) Can not comment on your directories as such, but at least you have a /boot directory.
I will be very glad if you could explain why I can not comment on your directories as such. thank you.
Quote:
h) its not entirely clear to me if you can boot into any linux, are you typing away merrily on windows?
There are six operating systems in my harddisk, any of them can be boot well, I post all the posts of this thread in Redhat linux.
grub.conf can be modified at the booting time, so it often doesn't matter if the file grub.conf has some errors.
Quote:
Your use of the word DESIGN make me think you are testing, so if i am wrong sorry.
I don't know what words I should say now. Thank you very much, you post a very long post in my thread.
Your post is helpful to me. Thank you.
Last edited by Xiangbuilder; 10-23-2003 at 04:57 AM.
1) Your first post says you copied /boot from hda13 to hda12. Do you agree you deleted the hda13 reference in your fstab?
2) When you boot into hda12 do you have a /boot folder and the vm and initrd files etc?
3) Assuming you have 4 linux systems which fstab have you booted to print out from? hda9,10,11, or 12?
4) Have you considered editting your grub file with the EDIT commands you are using to boot up?
5) Which hda (NUMBERS) boot without edit?
6) Have a look at my (a) and your previous posts on this issue. Did you notice that not one of your previous attempts shows you
spelt vmlinuz correctly and that you did not have /boot before the vm and init files?
COMMENT
1) I have only just spotted that mdk and rh do not share the same commands eg your rh default=0 versus Mdk default 0
2) your grub conf file appears to have /boot originally at hda13 and / at hda12.
3) create boot disks and test they work for all of your systems b4 trying if you decide not to use partimage
A quick lesson on command ROOT and what / means in the commands may be welcome.
root does not mean / nor does it mean /root . The root command should be spelt boot as its means what partiton do I look for
my vmlinuz etc files and its RELATIVE to that partition that root is meant.
so when you move a /boot folder to hda400........ root (hd0,399) .
when you had hda12 for / and hda13 for /boot root (hdo,12)
you can tell grub RELATIVELY OR ABSOLUTELY where to find stuff.
I notice you tried to define the /boot partiion in a prevous post with
root (hd0,11)/boot
FIlesystem type is ext2fs, partition type 0x83
kernel /boot/vmliuz-2.4.20-8 ro root=/dev/hda10
initrd /boot/initrd-2.4.20-8.img
YOu were almost there except you misunderstood this relative absolute concept of where /boot is. Hence if you used hd0,11 without
the /boot you should have got it in my opinion. But because you had /boot b4 the vm and init files grub was then looking for
/boot/boot/vmlinuz etc?
is that clearer?
LETS TRY THAT ABSOLUTELY to try to confuse you....no gaps between ) and /boot please.
You will need root privilege so type su then when prompted your root password THEN run the command for your editor (I use kwrite)
copy and paste this replacing your current ( hd0,11) entry.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.