You are not logged in.
Pages: 1
Hi,
I'm currently following the instructions here for installing linux on LVM.
Before I explain the problem, I want to mention that I have only 1 hard drive and it is 250GB. This device is /dev/sda.
I'm going to explain in *detail* how I came across the problem, and then I'll explain the problem at the end. Here it goes:
1) Backed up everything on my existing Archlinux installation which was using regular paritions (Not LVM).
2) Restarted and booted from the Archlinux LiveCD.
3) I now was booted from the LiveCD and had a command line prompt.
4) From the command line, I went to fdisk /dev/sda
5) From the fdisk prompt, I used 'd' to delete all 4 partitions first
6) Then, I used "n" to create my first new partition. I set this to "primary" and gave it the number "1", which makes it /dev/sda1. It has 100MB of space. The partition type is "Linux", or 0x83.
7) Next, I used "n" to create my second new partition. I set this to "primary" and gave it the number "2". It consumes the rest of the hard drive space. The partition type is "Linux LVM", or 0x8e.
8) From this point forward I follow the instructions on the wiki article I linked at the top of my post. After going to /arch/setup, I successfully made it through steps 1-4. When I created my filesystems for "swap" and "root" in step 1, it saw my logical volumes! However, when I'm at step 5 (Setting up GRUB bootloader), it is failing.
Basically, I go straight to "step 5" and select "GRUB" (versus LILO). It then presents me with the GRUB configuration file and allows me to preview it before I continue. Below is what the file looks like:
# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/hda (hd0)
# /dev/hdb2 (hd1,1)
# /dev/hda3 (hd0,2)
#
# FRAMEBUFFER RESOLUTION SETTINGS
# +-------------------------------------------------+
# | 640x480 800x600 1024x768 1280x1024
# ----+--------------------------------------------
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
# +-------------------------------------------------+
# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue
# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
# (0) Arch Linux
title Arch Linux
root DEVICE NOT FOUND
kernel /boot/vmlinuz26 root=/dev/mapper/vg01-root ro
initrd /boot/kernel26.img
# (1) Arch Linux
title Arch Linux Fallback
root DEVICE NOT FOUND
kernel /boot/vmlinuz26 root=/dev/mapper/vg01-root ro
initrd /boot/kernel26-fallback.img
# (1) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1
Notice how /dev/sda isn't in the "DEVICE NAME CONVERSIONS" table at the top of the file. Only 'hda' and 'hdb', and I have no idea what these devices are... I've never seen them before. Maybe it's just an example? I thought it was auto-generated.
Anyway, the important information is at the bottom. Notice how it says "root DEVICE NOT FOUND". I tried manually changing this to "root (hd0,0)" and continuing, but still fails. /dev/tty5 reports (after the failure) that it is still trying to set "root DEVICE NOT FOUND", even though I explicitly changed it in the file before continuing.
After editing the file, it gives me the option of what device/partition I want to install GRUB to. The options are as follows:
/dev/sda
/dev/sda1
/dev/sda2
I'm not sure why it is giving me "/dev/sda". I selected "/dev/sda1", since that's the dedicated 100MB partition I made for GRUB.
The logical volumes I created are as follows:
/dev/mapper/vg01-root
/dev/mapper/vg01-swap
vg01/root is my 10GB logical volume created through LVM which will be the installation destination for "/" (root).
vg01/swap is the 2GB logical volume I created through LVM for my swap.
If you notice in the code snippet above, the swap partition isn't utilized in the GRUB configuration. Is this normal? I thought there was supposed to be a "resume=/dev/mapper/vg01-swap" on the kernel line.
One last random note: the /boot directory is located on my /dev/mapper/vg01-root partition, versus the /dev/sda1 partition. I'm hoping that after GRUB stops being a pain in the ass that the files will be moved over by the installation process. I just want to make sure that /dev/sda1 is made the location for /boot. Why is /boot in my vg01-root partition?
Anyone have any idea what I'm doing wrong?
Last edited by void.pointer (2008-10-15 13:44:36)
Offline
I just want to make sure that /dev/sda1 is made the location for /boot. Why is /boot in my vg01-root partition?
During the installation, it asks you something along the lines of "Select additional partitions to mount under root." You have to select /dev/sda1 and give it the /boot mount point.
As for your "device name conversion" question, that's just an example template explaining grub terminology. It's not representative of your system.
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
You have to select /dev/sda1 and give it the /boot mount point.
How do I give it the /boot mount point?
Offline
How do I give it the /boot mount point?
I don't really know how to make it any clearer.
During the installation, it asks you something along the lines of "Select additional partitions to mount under root." You have to select /dev/sda1 and give it the /boot mount point.
It will ask for filesystem mount points. Select /dev/sda1. Type in /boot.
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
@ void.pointer:
1. Just for interest: if you have only 1 hdd, why do need/use lvm? It'd make sense only if you have more hdd's and would like to combine their partitions/storage spaces.
2. It seems to me that your /boot is on an extra partition (namely /dev/sda1). Therefor your menu.lst must look s.th. like
...
kernel /vmlinuz26 root=/dev/mapper/vg01-root ro
initrd /kernel26.img
...
we are Arch.
you will be assimilated!
resistance is futile!
Offline
@ void.pointer:
1. Just for interest: if you have only 1 hdd, why do need/use lvm? It'd make sense only if you have more hdd's and would like to combine their partitions/storage spaces.
Because I can. I'm thinking about the future. LVM is obviously a lot more flexible than typical partitioning schemes, so why not? I may add hard drives to my server later on and I can extend my logical volumes onto new physical extents as they become available.
creslin proposed a solution I had not tried yet, and I'm at work at the moment so I am unable to try it. I will try it when I get home tonight and see what happens. Thanks to everyone for helping!
Last edited by void.pointer (2008-10-14 18:53:18)
Offline
So you're saying you don't create a partition for GRUB? Where does your /boot go? Don't I have to have /dev/sda1 as a Linux partition for GRUB's /boot?
Correct. I have a partition for /boot but Grub is different to /boot
Grub is the bootloader and the files in boot are what boots (ie, the kernel).
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
void.pointer wrote:So you're saying you don't create a partition for GRUB? Where does your /boot go? Don't I have to have /dev/sda1 as a Linux partition for GRUB's /boot?
Correct. I have a partition for /boot but Grub is different to /boot
Grub is the bootloader and the files in boot are what boots (ie, the kernel).
I see what you mean now! So I'll put /boot on /dev/sda1 and install GRUB on /dev/sda (Which should put it in MBR right?)
Offline
Yes... and your /boot/grub/menu.lst entry would look like
root (hd0,0) # equals /dev/sda1
kernel /vmlinuz26 root=/dev/mapper/vg01-root ro # and i always add: [vga=792 quiet] and if some pci devices don't work add [pci=nomsi]
initrd /kernel26.img
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
During the installation, it asks you something along the lines of "Select additional partitions to mount under root." You have to select /dev/sda1 and give it the /boot mount point.
As for your "device name conversion" question, that's just an example template explaining grub terminology. It's not representative of your system.
Thanks for this solution! This worked out perfectly! My system is up and running on LVM now!
Offline
Pages: 1