View previous topic :: View next topic |
Author |
Message |
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Tue Nov 26, 2002 10:23 pm Post subject: grub, reiserfs and boot partition |
|
|
Hi all,
I'm having trouble gettin my system to boot. Any help is appreciated. I have a single partition for both /boot and / mount points. That is to say that I dont have a separate partition for /boot. To complicate things further..., the partition is formatted using reiserfs. I tried using grub 0.90 with reiserfs, and I got an error that this thread talks about:
https://forums.gentoo.org/viewtopic.php?t=15578
So, I switched to grub 0.92 and it detected reiserfs fine. I then made the grub.conf file and rebooted. It displays GRUB <something, but not an error> and reboots. This goes on forever. The following is wt I tried with my fstab:
1. I used notail option for both /boot and /, Didnt work
2. I used notail option for just the / and not boot, and the other way round. Didnt work.
3. I didnt bother trying the last combination...
More info: I installed grub using root (hd0,0), setup (hd0,0)(to install it in the first sector of this partition and not MBR), and quit... No errors here with grub-0.92. And yes, I do have this primary partition "active".
I realize I can probably get this to work using other options like creating another partition for boot(and making it ext2 or something), or using LILO, But I'd like to try and get this to work. If I dont have a choice then I guess I'll go ahead and try lilo.
Thanks in advance,
Harsha |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Nov 26, 2002 10:29 pm Post subject: |
|
|
Spontaneous rebooting is usually caused by a mismatch between the CPU setting of your kernel and the actual hardware. What is your CPU model and which processor type did you choose when you did "make menuconfig"? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Tue Nov 26, 2002 10:35 pm Post subject: |
|
|
I have a dual 866 PIII-Coppermine in SMP, and SMP is enabled in the kernel. The only thing I changed in the /etc/make.conf are the USE flags. I didnt mess with march, mcpu, etc settings. Also, while compiling, I choose P3, but I did disable some option which was something like P-II Xn <something>. I read the help for this and am assured that this has nothing to do with my machine. Also, I do no have any hardware raid in my system in case someone asks.
Quote: | Spontaneous rebooting is usually caused by a mismatch between the CPU setting of your kernel and the actual hardware. |
Thanks for this tip, I'll try recompiling my kernel with other options and see if it helps. But, I've installed Gentoo several times before, but trying reiserfs the first time. So, the only change is I'm using this fs instead of the usual etc3.
Thanks,
Harsha |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Wed Nov 27, 2002 12:06 am Post subject: |
|
|
What's installed in the master boot record? maybe you see an old grub stage1. The MBR boots the system, so maybe you see an old grub. What bootloader in MBR points to the first sector of your first partition (hd0,0)?
You need to use the notail option, and probably move all the files needed by grub, cause (my guess is that) just switching to notail doesn't effect the files already in the tree (tail), the result of writes with the tail option on. Well notail is necessary for partition that stores grub files, well it was the last time I looked.
Ps. I've started with one partition containing all dirs formated using Reiserfs, a long time back, and this worked fine, I however always used the notail option from the first time I installed gentoo.
Hope you fix it,
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Wed Nov 27, 2002 1:00 am Post subject: |
|
|
hey!
I dont have anything in MBR. I never install anything in MBR. I have 3 primary+extended(3 logical with one being the swap). Whatever operating systems I install in these primary, I make sure I dont overwrite the whole MBR, I always write it to the first sector of their respective boot partitions. The idea is that if I want to get rid of an OS, I just format/delete that partition and I dont mess with any MBR or the rest of the partitions. If I want to boot into any of these partitions, I just set that partition "active" from the OS I'm in right now.(Of course this is only when I want to delete partitions. I have menus in all three which take me to the remaining 2 OS's.)
Regarding notail, like I mentioned, I tried all combinations. I think the problem is with grub. I dont even see the menu, and it reboots even before that. I need to learn about wt the kernel option does in grub.conf and if there are other options that I can add to this.
Thanks!
Harsha |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Wed Nov 27, 2002 8:52 am Post subject: |
|
|
If it reboots before the menu, it can't have anything to do with kernel options and probably not even with grub.conf. My best bet it that it has got to do with the notail option. Grub is very specific about the notail option using ReiserFS.
Quote: | 31 : File is not sector aligned
This error may occur only when you access a ReiserFS partition by block-lists (e.g. the command install). In this case, you should mount the partition with the `-o notail' option. |
Quote: | notail
By default, ReiserFS stores small files and `file tails' directly into the tree. This confuses some utilities like LILO. This option is used to disable packing of files into the tree. |
As stated above it stores file tails into the tree, and therefor just remounting a filesystem using notail has no effect, cause the existing files aren't reallocated and the tails are still in the tree. Although I hope you can solve it by copying all grub/boot related files to another place, mounted using notail, and then removing the original files and moving the copy back, I am afraid that you need to do this with all the files to remove all tails from the tree. Maybe only moving isn't enough and you need to start clean with a notail mounted partition (copy it to a temporary partition if you have one lying around). This maybe a reason for a seperate boot partition, but you probably use Windows which is very picky about the partition table and extended partitions, so you are forced to use tree primairy and one extended,
Hope you fix it,
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
helmers Guru
Joined: 16 Sep 2002 Posts: 553 Location: Stange, Norway
|
Posted: Wed Nov 27, 2002 12:10 pm Post subject: |
|
|
harsha wrote: | hey!
I dont have anything in MBR. I never install anything in MBR. I have 3 primary+extended(3 logical with one being the swap). Whatever operating systems I install in these primary, I make sure I dont overwrite the whole MBR, I always write it to the first sector of their respective boot partitions. The idea is that if I want to get rid of an OS, I just format/delete that partition and I dont mess with any MBR or the rest of the partitions. If I want to boot into any of these partitions, I just set that partition "active" from the OS I'm in right now.(Of course this is only when I want to delete partitions. I have menus in all three which take me to the remaining 2 OS's.)
Harsha |
I'm not 100% sure, but from what I've seen, WindowsXP, and most older versions installs their MBR when the OS is installed. I think you need *something* in the MBR-area, for anything to boot. The MS one does what you described, namely loading the priamry partition marked as active. So the question is, have you EVER installed a MS OS on your system with that HD as the Primary Master? _________________ C is for Cookies! |
|
Back to top |
|
|
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Wed Nov 27, 2002 7:26 pm Post subject: |
|
|
Sorry guys for replyin so late. I still cant get it to work. I've pretty much given up on the reboot thing. grub is givin me too many probs the last few days. I managed to create a new boot partition and formatted it to ext2/3, reiserfs, tried them all..nothing works. grub give some error. It either reboots like earlier, or gives error when I try to do root (hd0,0), etc. Its error 17 this time. It supposedly means, its able to detect the device, but not the file system on the device. Like I mentioned, I tried all the above fs's...And yeah, I did move the whole of /boot contents to someplace else before copyin them back...to take care of the tails that you(LX) mentioned.
And then I spend atleast an hour trying to figure out why I wasnt able to format the boot partition using ext2/3. Turns out mke2fs [-j] cant format a partition thats smaller than 100MB. I didnt read this somewhere, but it only worked when the size was >100MB. So, I assured meself of that.
Regarding the primary partitions, helmers, Windows(I have 2 Win2k partitions) might be writing to the MBR, but Consider this: I've taken a brand new drive and made partitions and installed linux first, and installed the boot loader in the first sector rather than the MBR, made that partition "active" using fdisk, it worked just fine. So, I dont think you'll really need to write anything to MBR to boot. Also, I made sure I installed linux in a partition thats not the first one on the drive. I kinda assumed that the bios might try to boot to the 1st sector 1st track, etc of the harddrive. So, unless fdisk is writing something to the MBR, It doesnt make sense.
Thanks for you help,
Harsha |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Nov 27, 2002 7:40 pm Post subject: |
|
|
Could you post the complete partition layout of this disk? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Thu Nov 28, 2002 1:09 am Post subject: |
|
|
rac: I hope u are not looking for the exact block numbers etc of the partitions, here u go: <the drive's capacity is 40GB(38.1 something rather)).
/dev/hda1 <around 6 GB> *(active) Linux (reiserfs)
/dev/hda2 <around 6GB> NTFS
/dev/hda3 <around 6GB> NTFS
/dev/hda4 <rest of the disk, around 20GB> Extended Partition
/dev/hda5 <first logical, around 512 MB> Linux Swap
/dev/hda6 <second logical, around 1GB> FAT32
/dev/hda7 <Third logical, rest> NTFS
The above is before I had the /boot partition. Now I have the following:
/dev/hda1 <around 120MB> *(active) Linux(ext2/3 or reiserfs)
/dev/hda2 <around 6GB> NTFS
/dev/hda3 <around 6GB> NTFS
/dev/hda4 <rest of the disk> Extended Partition
/dev/hda5 <first logical, around 1GB> FAT32
/dev/hda6 <second logical, around 15 GB> NTFS
/dev/hda7 <third logical, around 512 MB> Linux Swap
/dev/hda8 <fourth logical, rest> Linux(ext3)
-Harsha |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Thu Nov 28, 2002 10:19 am Post subject: |
|
|
Journaled file systems are for big partitions with lots of files / changes, so you can safely make your boot ext2, cause it mostly unmounted (unless changing kernel) or read-only.
I hope you have a lot of memory cause having a swap miles away from root partition ain't a pretty side, but I see you have changed it to the better, too bad the outerring of most harddisks perform lot less then the inner. (my hd inner <= 1Gb 33 Mb/s outer 27Gb 27 Mb/s).
Bios reads the MBR to boot (there's a jump to last .. bytes of this sector which contains small boot loader), it's installed by software cause a new drive is completly empty, installing Windows overrides this MBR, which is fuckin annoying, but well I solved it by installing a linux only system, , just go cold turkey.
http://support.microsoft.com/default.aspx?scid=KB;en-us;q69013 Quote: | FDISK /MBR Rewrites the Master Boot Record
...
This article was previously published under Q69013
SUMMARY
The MS-DOS Fdisk utility usually updates the master boot record (MBR) only if no master boot record exists. Repartitioning with Fdisk does not rewrite this information.
Fdisk has an undocumented parameter called /mbr that causes it to write the master boot record to the hard disk without altering the partition table information.
WARNING: Writing the master boot record to the hard disk in this manner can make certain hard disks partitioned with SpeedStor unusable. It can also cause problems for some dual-boot programs and disks with more than four partitions. |
So I think the problems lies in Windows MBR not wanting to boot grub, which sound like microsoft alright.....
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Thu Nov 28, 2002 5:13 pm Post subject: |
|
|
Quote: | the outerring of most harddisks perform lot less then the inner. (my hd inner <= 1Gb 33 Mb/s outer 27Gb 27 Mb/s). |
Learning somethin new everyday. These forums are great...I did know that the data density decreases as u go up the drive...but i was always under the impression that the access time is still constant...have to research a lil on that...Also, how did u get those numbers? Benchmarking? or manufacturer's datasheet???
I do have 512MB RAM so I dont swap out much.
Quote: | but well I solved it by installing a linux only system |
Unfortunately I dont have a choice here. All my work has to be done in windows bcuz of the software that i need to use.
Thanks,
Harsha[/quote] |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Fri Nov 29, 2002 9:38 am Post subject: |
|
|
I used a very crude test:
Code: | time dd if=/dev/hda of=/dev/null bs=1048576 count=512 skip=0
time dd if=/dev/hda of=/dev/null bs=1048576 count=512 skip=27648 |
Well I reran them and I get a major difference between the beginning of my disk and the end (10mb), but I'm running it on a fully active system with distro at start of disk. But well the difference in raw speed is evident.
Access time is depended of the position of the reading head and the layout of the harddrive, but normally datasheets give avarage access times,
Quote: | Data access time is the combination of seek time, head switch time and rotational latency and is measured in ms. |
Quote: | The fastest seek time occurs when moving from one track directly to the next. The slowest seek time is the so called full-stroke between the outer and inner tracks. |
btw. did you solve the grub problem already? make your boot partition ext2 (for above reasons), you should then have something like:
Code: | drwxr-xr-x 4 root root 1024 Nov 29 10:28 .
drwxr-xr-x 19 root root 1416 Nov 28 22:07 ..
-rw-r--r-- 1 root root 645978 Nov 28 12:29 System.map
lrwxrwxrwx 1 root root 1 Sep 2 00:32 boot -> .
-rw-r--r-- 1 root root 1399280 Nov 28 12:30 bzImage
-rw-r--r-- 1 root root 20824 Nov 28 12:22 config
drwxr-xr-x 2 root root 1024 Nov 7 17:05 grub
grub:
-rw-r--r-- 1 root root 7776 Oct 31 01:20 e2fs_stage1_5
-rw------- 1 root root 868 Nov 4 01:53 grub.conf
-rw-r--r-- 1 root root 9376 Oct 31 01:19 reiserfs_stage1_5
-rw-r--r-- 1 root root 33856 Nov 7 17:05 splash.xpm.gz
-rw-r--r-- 1 root root 512 Oct 31 01:19 stage1
-rw-r--r-- 1 root root 102596 Oct 31 01:19 stage2
|
Hope you fix it,
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
qnx l33t
Joined: 25 Jun 2002 Posts: 638 Location: Göteborg, Sweden
|
Posted: Fri Nov 29, 2002 9:39 pm Post subject: |
|
|
I just typed and made some changes to /etc/lilo.conf and the problem was gone.... _________________ Registred Linux user #191143!
Abit NF7-S rev. 2.00 (BIOS v. 2.7)
AMD AthlonXP 2500+ (Barton)
PATA Seagate ST3120022A
SATA Seagate ST3200822AS & Silicon Image 3112 chipset
Gentoo Linux |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Fri Nov 29, 2002 9:53 pm Post subject: Re: grub, reiserfs and boot partition |
|
|
Why do LILO boosters feel the need to post in GRUB threads? It's annoying. If someone asks what bootloader would be best given criteria X, Y, or Z, it would be appropriate to plug LILO. But not when somebody is asking for help setting up GRUB. Especially when they have explicitly said:
harsha, in the very first post of the thread wrote: | I realize I can probably get this to work using other options like [...] using LILO, But I'd like to try and get this to work. |
So please stop this. Or if you're going to bother, could you at least make the posts clever and/or amusing? I'm not meaning to single qnx out here - it feels like I see at least one of these types of posts every day or two. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
harsha n00b
Joined: 19 Jul 2002 Posts: 37 Location: Philadelphia, PA
|
Posted: Fri Nov 29, 2002 10:38 pm Post subject: |
|
|
I wasnt able to "fix" the problem, but managed to get rid of it anyway by reinstalling everything. I'm a lil too impatient when it comes to these things.... I made /boot as ext2 like u guys suggested, and root as reiserfs. Works great. I vaguely know about the dd command(some kinda dump which just dumps data read from a low level to a file, etc), but never actually needed it for anything except to make a bootsect.dos file so I can add Linux in the Windows NT bootloader. Have to look into this utility.
I think your test is very smart, cuz I dont believe the manufacturer's give out this kinda data. Will try these tests out myself after learning more about dd.
Thanks again,
Harsha
P.S. The splash image in grub FINALLY works! |
|
Back to top |
|
|
michaelj n00b
Joined: 30 Nov 2002 Posts: 9
|
Posted: Sun Dec 01, 2002 12:36 pm Post subject: |
|
|
I just managed (with the help of these forums, and much trial/error) to get my GRUB install with ReiserFS working.
The main install was a Stage1 install. Having killed my system, with all the grub problems mentioned elsewhere, and then booting using the Gentoo CD (as advised in my request for help), I ended up doing the following.
I have three partitions - boot and root are reiserFS, and swap is swap. They follow the install example completely.
I emerged grub-0.92-r1 (which is masked - learnt to use the full path).
[for example: emerge /usr/portage/sys-apps/grub/grub-0.92-r1.ebuild]
I copied the files from /usr/share/grub/i386-pc/ into /boot/grub
(As mentioned in another thread they don't get copied automatically, and without copying them, I kept getting ERROR 17).
Everything now works great.
Hopefully this will help any other newbies like myself, and maybe one day will make a sticky
Anyway, I'm off to explore my system now...
Michael. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|