Results 1 to 7 of 7
I have presently a (working) boot dedicated partition, where grub stuff resides, but I want to change it to a common "/boot" folder in the root partition (in a different ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-31-2010 #1Linux Newbie
- Join Date
- Apr 2007
- Posts
- 214
Can`t change the boot partition for some reason
I have presently a (working) boot dedicated partition, where grub stuff resides, but I want to change it to a common "/boot" folder in the root partition (in a different hdd).
For some reason I can't do it.
The first thing I did was to copy all the things that are in the boot partition to a boot folder on the root partition. After that, I tried:
grub-install /dev/hdc1
(which is odd but it's where the root partition actually is)
When I did it from the linux I have installed on my hdd, it actually did something, I don't remember all the output (except that there was something about it not being able to access hda, which is oddly the dvdrom), but it didn't work.
From a live CD, the same command (grub-install /dev/hdc1) is answered with:
Could not find device for /boot: Not found or not a block device.
From grub's own prompt, the things are more or less the same.
First of all, it does not find stage1, even though I did copy the content from the boot partition to a boot folder in the root partition.
I tried to proceed, anyway, with root (hd1,0) and setup (hd1,0) (which is /dev/hdc1, according with the "geometry" info given by grub). "Root" is accepted, but "setup" is answered with:
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 2: Bad file or directory type
But the files are there. I can't "cat" the menu.lst from grub though, unlike with the actual working boot partition. The same error message. From the terminal, however, it's all there.
I tried with /dev/hdc1 both mounted and unmounted, the same message.
So, basically I have two questions, I guess:
1 - can I really do this sort of thing running a linux installed on a hdd, rather than a live cd, or is the live cd preferable for some reason?
2 - what am I missing?
(A note that may worth making is that I'm using the soon-to-be deprecated grub version, 0.9 or something, not grub2. I think it shouldn't be a problem since I've installed the system with the old version to begin with, but that may be irrelevant, I don't really know)Last edited by the dsc; 01-31-2010 at 03:52 PM.
- 02-01-2010 #2Linux Newbie
- Join Date
- Feb 2006
- Location
- Dover, DE
- Posts
- 112
Not sure but does /dev/hdc1 need to have to bootable flag set manually or does grub-install do that for you?
- 02-01-2010 #3
You should be able to install grub from Linux ... try mounting hdc1 eg to /media/hdc1 can you post the output of
andCode:ls /media/hdc1/boot -l
Code:ls /media/hdc1/boot/grub -l cat /etc/mtab
- 02-01-2010 #4Linux Newbie
- Join Date
- Apr 2007
- Posts
- 214
I don't remember how it got there, but it's there:
Code:Device Boot Start End Blocks Id System /dev/hdc1 * 1 2310 18555043+ 83 Linux /dev/hdc2 2311 4658 18860310 83 Linux /dev/hdc3 4659 4865 1662727+ 82 Linux swap / Solaris
You mean from a "non-live" linux, my current installation, right?
If it is... I'll be mounting hdc1 twice... I don't understand why (perhaps you were expecting I'd be doing it from a live cd?), but anyway, here it is:
(Before doing that, I've unmounted the boot partition, otherwise would be that to be listed, rather than the boot folder on the root partition, which would be completely ignored... is that what you're expecting, or for some reason what resides on the actual working boot partition is what is really relevant here? That would have been the same files, anyway, except for "BOOT-SYSTEMPARTITION" which I just created to know more easily which partition I am seeing)
Code:[21:37:48 - root ] /boot > ls /media/hdc1/boot -l total 71256 -rw-r--r-- 1 root root 266619 2006-05-23 13:56 abi-2.6.15-23-386 drwxr-xr-x 3 root root 4096 2010-01-31 13:29 boot drwxr-xr-x 2 root root 4096 2010-01-31 14:35 bootfileshere -rw-r--r-- 1 root root 0 2010-01-31 11:58 BOOT-SYSTEMPARTITION -rw-r--r-- 1 root root 69878 2006-05-23 10:47 config-2.6.15-23-386 -rw-r--r-- 1 root root 81027 2010-02-01 11:41 config-2.6.26 -rw-r--r-- 1 root root 91640 2009-03-13 19:37 config-2.6.26-1-686 -rw-r--r-- 1 root root 92016 2009-11-04 22:22 config-2.6.26-2-486 -rw-r--r-- 1 root root 91712 2009-11-04 22:24 config-2.6.26-2-686 -rw-r--r-- 1 root root 92579 2009-12-06 21:40 config-2.6.26.2-custom drwxr-xr-x 2 root root 4096 2010-01-31 13:31 grub -rw-r--r-- 1 root root 6999058 2009-03-30 04:03 initrd.img-2.6.15-23-386 -rw-r--r-- 1 root root 6211192 2009-04-12 14:08 initrd.img-2.6.26-1-686 -rw-r--r-- 1 root root 6210890 2009-04-12 14:05 initrd.img-2.6.26-1-686.bak -rw-r--r-- 1 root root 6209656 2009-01-09 00:22 initrd.img-2.6.26-1-686.bak2 -rw-r--r-- 1 root root 6236161 2009-11-14 18:04 initrd.img-2.6.26-2-486 -rw-r--r-- 1 root root 6237453 2009-09-09 14:42 initrd.img-2.6.26-2-486.bak -rw-r--r-- 1 root root 6229934 2009-11-14 18:05 initrd.img-2.6.26-2-686 -rw-r--r-- 1 root root 6225562 2009-04-17 18:10 initrd.img-2.6.26-2-686.bak -rw-r--r-- 1 root root 6315239 2009-12-07 01:40 initrd.img-2.6.26.2-custom -rw-r--r-- 1 root root 94760 2005-10-25 08:32 memtest86+.bin -rw-r--r-- 1 root root 725460 2006-05-23 13:56 System.map-2.6.15-23-386 -rw-r--r-- 1 root root 1096452 2010-02-01 11:41 System.map-2.6.26 -rw-r--r-- 1 root root 928033 2009-03-13 19:37 System.map-2.6.26-1-686 -rw-r--r-- 1 root root 912535 2009-11-04 22:22 System.map-2.6.26-2-486 -rw-r--r-- 1 root root 928209 2009-11-04 22:24 System.map-2.6.26-2-686 -rw-r--r-- 1 root root 912352 2009-12-07 01:20 System.map-2.6.26.2-custom -rw-r--r-- 1 root root 1414477 2006-05-23 13:56 vmlinuz-2.6.15-23-386 -rw-r--r-- 1 root root 2042896 2010-02-01 11:41 vmlinuz-2.6.26 -rw-r--r-- 1 root root 1506512 2009-03-13 19:36 vmlinuz-2.6.26-1-686 -rw-r--r-- 1 root root 1468944 2009-11-04 22:21 vmlinuz-2.6.26-2-486 -rw-r--r-- 1 root root 1506128 2009-11-04 22:23 vmlinuz-2.6.26-2-686 -rw-r--r-- 1 root root 1510512 2009-12-07 01:20 vmlinuz-2.6.26.2-custom
Code:[21:37:53 - root ] /boot > ls /media/hdc1/boot/grub -l total 268 -rw-r--r-- 1 root root 197 2010-01-31 13:31 default -rw-r--r-- 1 root root 45 2009-03-30 04:03 device.map -rw-r--r-- 1 root root 8704 2010-01-31 13:31 e2fs_stage1_5 -rw-r--r-- 1 root root 8544 2010-01-31 13:31 fat_stage1_5 -rw-r--r-- 1 root root 9568 2010-01-31 13:31 jfs_stage1_5 -rw-r--r-- 1 root root 6379 2010-01-28 22:29 menu.lst -rw-r--r-- 1 root root 6279 2009-12-22 19:15 menu.lst~ -rw-r--r-- 1 root root 5133 2009-04-18 08:48 menu.lst.bak -rw-r--r-- 1 root root 5282 2009-06-28 13:58 menu.lst.constante -rw-r--r-- 1 root root 5272 2009-06-28 13:57 menu.lst.constante~ -rw-r--r-- 1 root root 6279 2009-12-22 19:15 menu.lst.prev -rw-r--r-- 1 root root 5456 2009-04-18 08:48 menu.lsttttttttttt -rw-r--r-- 1 root root 7904 2010-01-31 13:31 minix_stage1_5 -rw-r--r-- 1 root root 10720 2010-01-31 13:31 reiserfs_stage1_5 -rw-r--r-- 1 root root 512 2010-01-31 13:31 stage1 -rw-r--r-- 1 root root 128552 2010-01-31 13:31 stage2 -rw-r--r-- 1 root root 10280 2010-01-31 13:31 xfs_stage1_5
Code:[21:38:59 - root ] /boot > cat /etc/mtab /dev/hdc1 / ext3 rw,errors=remount-ro 0 0 tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0 procbususb /proc/bus/usb usbfs rw 0 0 udev /dev tmpfs rw,mode=0755 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0 fusectl /sys/fs/fuse/connections fusectl rw 0 0 /dev/hdd1 /home ext3 rw,noatime 0 0 /dev/hdd2 /media/files-60G ext3 rw,noatime 0 0 /dev/hdb1 /media/windows fuseblk rw,allow_other,blksize=4096 0 0 /dev/hdb2 /media/win-files fuseblk rw,allow_other,blksize=4096 0 0 /dev/hdc2 /media/files-19G ext3 rw,noatime 0 0 /dev/hdc1 /media/hdc1 ext3 rw 0 0
- 02-02-2010 #5
From your first post I mis-understood 'common /boot folder' and the fact you had a boot partition that you had more than one version of Linux installed. So I was expecting you to start a different distro you also had installed.
Wanted to check files listed as regular files rather than links which they look to be OK. Have you tried as root
which should return (hd2,0) - hdc1 ... if it does tryCode:grub find /boot/grub/menu.lst
this should install grub to the mbr of hdc ... if it all goes well you should be able to quit grub and restart the system.Code:root (hd2,0) setup (hd2)
If you get odd output from grub find command then try
to check exactly how grub is identifying hdc1.Code:find /boot/grub/BOOT-SYSTEMPARTITION
- 02-12-2010 #6Linux Newbie
- Join Date
- Apr 2007
- Posts
- 214
I didn't succeed with the whole thing, but I'd like to say thanks for all the help anyway.
I won't even try anymore, it's likely I'm going to either format that PC or maybe just leave the way it is, as I bought a new one.
Not that it really matter, but the problem may have to do with old hardware starting to fail. I have a usb scanner which, initially I thought that was not properly installed in linux, because when I tested in other PCs with windows, it worked just fine. However, I've installed windows there too (what a waste!), and it actually works even less. In the new PC it works just fine, so I guess that that PC is really suffering from old age (it is an AMD "renamed Athlon XP" Sempron Thoroughbred), and I guess the motherboard might have been even older, if that's possible.
Well, that's it. Case closed. Thanks for all the help.
- 03-18-2010 #7Just Joined!
- Join Date
- Jul 2009
- Posts
- 16
I wouldn't give up. grub-install /dev/hdc --root-directory=/boot
This will create a boot folder in /boot, so just remember that. Don't move it. Or you could try grub-install /dev/hdc afterwards and see if you need the second boot folder.




