You are not logged in.
So I've moved some partitions (as shown in this screenshot) and everything looks fine, I can access all my data from Arch partitions just by using LiveCD. However, my /dev directory is empty (it contains `console`, `null` and `zero` files only) and (because of this) Arch won't boot, because grub can't find the kernel image. What should I do now?
Last edited by ravicious (2011-08-22 09:33:46)
Offline
Offline
Well, I have only three partitions for Arch: / (root), /home and /boot. When I use LiveCD and browse root, isn't /dev supposed to be populated?
Anyway, here's how the situation looks:
fdisk -l before messing with partitions (messages are in Polish, but it shouldn't be a problem):
~ $ sudo fdisk -l
Hasło:
Dysk /dev/sda: 320.1 GB, bajtów: 320072933376
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 38913, w sumie sektorów: 625142448
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0xaad13451
Urządzenie Rozruch Początek Koniec Bloków ID System
/dev/sda1 * 63 401624 200781 7 HPFS/NTFS/exFAT
/dev/sda2 417690 105277325 52429818 7 HPFS/NTFS/exFAT
/dev/sda3 105290071 594198527 244454228+ f W95 Rozsz. (LBA)
/dev/sda4 594199552 625142447 15471448 12 Compaq diagnostics
/dev/sda5 517100220 594198527 38549154 7 HPFS/NTFS/exFAT
/dev/sda6 105290073 165276719 29993323+ 83 Linux
/dev/sda7 165276783 165533759 128488+ 83 Linux
/dev/sda8 165533823 517100219 175783198+ 83 Linux
Wpisy w tablicy partycji nie są w tej kolejności, co na dysku
fdisk -l after messing with partitions:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xaad13451
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 7 HPFS/NTFS
/dev/sda2 27 6554 52429818 7 HPFS/NTFS
/dev/sda3 8480 38913 244461105 f W95 Ext'd (LBA)
/dev/sda5 8481 12214 29993355 83 Linux
/dev/sda6 12215 12230 128488+ 83 Linux
/dev/sda7 12231 38913 214331169 83 Linux
According to this, I've changed /boot/grub/menu.lst and /etc/fstab. Here's how menu.lst looks like:
# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue
# (0) Arch Linux
title Arch Linux
root (hd0,4)
kernel /vmlinuz-linux root=/dev/sda6 ro
initrd /initramfs-linux.img
# (1) Arch Linux
title Arch Linux Fallback
root (hd0,4)
kernel /vmlinuz-linux root=/dev/sda6 ro
initrd /initramfs-linux-fallback.img
# (2) Windows
title Windows 7
rootnoverify (hd0,0)
makeactive
chainloader +1
(hd0,4) should point to /dev/sda5 (well, there's root partition) and /dev/sda6 points to /boot, so I think I didn't make any mistake here.
Here's fstab:
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
/dev/sda5 / ext4 defaults 0 1
/dev/sda6 /boot ext4 defaults 0 1
/dev/sda7 /home ext4 defaults,user_xattr 0 1
/dev/sda2 /mnt/windows ntfs-3g gid=users,fmask=113,dmask=002 0 0
I hope this explains my situation a bit more clearly.
Last edited by ravicious (2011-08-22 00:44:42)
Offline
When I use LiveCD and browse root, isn't /dev supposed to be populated?
/dev should be mounted for the live environment. Unless you decided to mount another instance on devtmpfs on /path/to/arch-install/dev, I'm not sure why you'd expect it to be there.
Seems that you've physically moved the /boot partition on the disk. You'll probably need to reinstall grub to the MBR to make sure it knows how to get to /boot and /.
Last edited by falconindy (2011-08-22 00:55:39)
Offline
Seems that you've physically moved the /boot partition on the disk. You'll probably need to reinstall grub to the MBR to make sure it knows how to get to /boot and /.
So all I have to do now is to run `grub-install /dev/sda` as a root, right? Is it safe to do this right now? My memories with installing grub to the mbr are quite bad... At this moment it's rather impossible for me to do a full system backup, I have only my media backed up on my other computer, losing my current Arch installation would be pretty painful.
Last edited by ravicious (2011-08-22 01:05:07)
Offline
You'd want to ignore the current device map as well and make sure to target the right root directory... It's been a while, but if my memory serves me:
grub-install --root-directory=/path/to/arch-install --recheck /dev/sda
Of course, make sure /boot is mounted in the right place as well.
Offline
grub is working, here's what I have done, step by step:
Mounted /boot partition at /media/boot
Ran grub-install:
grub-install --root-directory=/media/boot --recheck /dev/sda
grub created a boot directory under /media/boot/boot, so I ran grub-install once again:
grub-install --root-directory=/media --recheck /dev/sda
Rebooted my laptop
Window boots without any problems, booting to Arch gives me error 15. I'll try to figure something out, but I don't see what could possibly be wrong.
BTW, now I see that I could simply do this:
mount /dev/sda5 /mnt/main
mount /dev/sda6 /mnt/main/boot
grub-install --root-directory=/mnt/main /dev/sda
Is it diffrent from having /boot under /media/boot?
Edit:
I'll try to reinstall grub using command from the second method.
Edit2:
Apparently I had to change my menu.lst file to something like this:
# (0) Arch Linux
title Arch Linux
root (hd0,5)
kernel /vmlinuz-linux root=/dev/sda5 ro
initrd /initramfs-linux.img
Just to remember: `root` should point to /boot partition, `kernel [...] root=` should point to / (root).
Last edited by ravicious (2011-08-22 09:38:54)
Offline