LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2012, 02:00 AM   #1
Novalight
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
Question Dualboot (VM) CentOS 6.2 + Archlinux system hangs after GRUB menu when booting Arch


Hi, I've been doing some searching around, but I haven't quite found anything pertaining to my specific issue.

Like most things, I test them out before doing the real thing, so although this is VM simulation, I want to get it right on a virtual system before I actually mess with my physical harddrive.


The reason I'm doing this is that CentOS is an amazingly stable system and I absolutely love it, it's great for dedicated setups, but I like to get a super-multifunctional system aswell, and when I add the repos I need to CentOS, things start conflicting and it gets ugly. So I figure Arch might do it better.



What I want to accomplish is dualbooting CentOS 6.2 with Archlinux in a single luks encrypted LVM. I would prefer keeping the number of partitions to the least amount possible (two, if possible).

Although, I'm shaky on sharing a single /boot partition with the two distros because of the possibility of a conflicting kernel update.


--------- ISSUE ---------


Anyway, I use the CentOS install disc to setup the partitions on the drive, get the encryption setup, and have it as my base system, and use its GRUB bootloader. and it works when I boot it up.

here's the partition layout:

the /boot partitions are ext2
everything else except for swap is formatted ext4


/dev/sda1 /boot bootable CentOS boot

/dev/sda3 /boot Arch boot
/dev/sda2 luks-LVM
/dev/mapper/vg-CentR / CentOS root
/dev/mapper/vg-CentH /home CentOS home

/dev/mapper/vg-ArchR / Arch root
/dev/mapper/vg-ArchH /home Arch home

/dev/mapper/vg-data Shared media/data partition
/dev/mapper/vg-swap swap


I only format the Arch partitions to ext4 with the CentOS install disc without mounting them, so I can simply mount them and skip formatting when I go to install Arch.

I've followed all the Archlinux tutorials I've been able to find and they've worked beautifully for a standalone Archlinux installation

but after I get done installing Archlinux to the LVM, and make the changes I'm supposed to make to the GRUB menu.lst file, add the HOOKS to the mkinitcpio.conf file, and teel the rc.conf file, I skip the bootloader installation, and add Arch to the GRUB menu in the CentOS /boot partition, Arch won't boot.


It showes up in the menu, but after selecting it, I see a cursor show up, frozen, and the system is just stuck, and the only thing I can do it reset, but CentOS boots up just fine.


Here are what my files look like for both OSes:


CentOS GRUB:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_revlib-CR rd_LVM_LV=vg_revlib/swap LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg_revlib/CR rhgb crashkernel=auto rd_LUKS_UUID=luks-82caf348-5f88-4377-98b8-58ae8f4f72e1 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-220.el6.x86_64.img

title Arch
root (hd0,2)
kernel /vmlinuz-linux cryptdevice=/dev/sda2:root root=/dev/mapper/vg_revlib-AR ro
initrd /initrafms-linux.img

title Arch2
root (hd0,0)
kernel /vmlinuz-linux cryptdevice=/dev/sda2:root rot/dev/mapper/vg_revlib-AH ro
initrd /initrafms-linux.img


CentOS mtab:

/dev/mapper/vg_revlib-CR / ext4 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw,rootcontext="system_u:object_r:tmpfs_t:s0" 0 0
/dev/sda1 /boot ext2 rw 0 0
/dev/mapper/vg_revlib-CH /home ext4 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/sr0 /media/CentOS_6.2_Final iso9660 ro,nosuid,nodev,uhelper=udisks,uid=500,gid=501,iocharset=utf8,mode=0400,dmode=0500 0 0
/dev/sda3 /media/81e0e750-1c53-4ef6-abf5-ad650fdbae40 ext2 rw,nosuid,nodev,uhelper=udisks 0 0
/dev/mapper/vg_revlib-AR /media/226f76e5-67c1-4f9f-b82d-4149e904e37f ext4 rw,nosuid,nodev,uhelper=udisks 0 0
/dev/sdb1 /media/REPOSITORY vfat rw,nosuid,nodev,uhelper=udisks,uid=500,gid=501,shortname=mixed,dmask=0077,utf8=1,flush 0 0



CentOS fstab:



#
# /etc/fstab
# Created by anaconda on Mon Jun 25 23:33:08 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_revlib-CR / ext4 defaults 1 1
UUID=26aecdbc-c8f9-402d-a7a6-35b8c049fe5f /boot ext2 defaults 1 2
/dev/mapper/vg_revlib-CH /home ext4 defaults 1 2
/dev/mapper/vg_revlib-swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0



Arch rc.conf:


LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="America/Bogota"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
# Replace every !module by an entry as on the following line in a file in
# /etc/modprobe.d:
# blacklist module
# See "man modprobe.conf" for details.
#
MODULES=()

# Udev settle timeout (default to 30)
UDEV_TIMEOUT=30

# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"

# Scan for BTRFS volumes at startup
USEBTRFS="no"

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="yes"





Arch mkinitcpio.conf:


HOOKS="base udev autodetect pata scsi sata lvm2 encrypt filesystems usbinput"




Arch GRUB (not used):

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz-linux root=/dev/mapper/vg_revlib-AR ro
initrd /initramfs-linux.img

# (1) Arch Linux
title Arch Linux Fallback
root (hd0,2)
kernel /vmlinuz-linux root=/dev/mapper/vg_revlib-AR ro
initrd /initramfs-linux-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1



Arch fstab:


#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
tmpfs /tmp tmpfs nodev,nosuid 0 0
/dev/mapper/vg_revlib-AH /home ext4 defaults 0 1
/dev/mapper/vg_revlib-AR / ext4 defaults 0 1
/dev/mapper/vg_revlib-swap swap swap defaults 0 0
/dev/sda3 /boot ext2 defaults 0 1



Arch (there is not mtab)



I took parts of the files that I thought would be the most helpful, I can provide more information if needed.


Arch and Arch2 are both for the same Arch install, I was just trying the two different ways that I was able to think of to get it working. I tried chainloading to Arch and I get an error regarding the command.

I even tried copying the vmlinuz-linux and initramfs-linux.img files to the CentOS /boot partitions, and edited the GRUB (hdx,y)
accordingly and still stuck with the same issue.

I don't quite consider myself to be walking noob territory anymore, but still, I have absolutely no idea what to do here.

The current menu has some typos, but this is around the 6-8th time I've tried doing this setup with the exact same problem happening, and those typos were fixed during my previous attempts.


Also, if I try to boot from local drive while the CentOS.iso is plugged into the VM, I get:

FATAL: INT18: BOOTFAILURE

Any ideas on what it is?




P.S.

I like to add colors since I find it easier to separate information that way, if you find it obnoxious, I'll edit my post to get rid of them
 
Old 06-29-2012, 07:09 PM   #2
Slackyman
Member
 
Registered: Mar 2011
Location: Rome - Italy
Distribution: Slackware 13.1
Posts: 347

Rep: Reputation: 44
Oh, it's really late here in Italy and you're asking a complicated thing while I'm nearly drunk!
Let me get a little time to think about it!
 
Old 06-29-2012, 11:50 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,318

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
Quote:
Originally Posted by Novalight View Post
... I skip the bootloader installation, and add Arch to the GRUB menu in the CentOS /boot partition, Arch won't boot.
...
Later, you add ...

Arch GRUB (not used):

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz-linux root=/dev/mapper/vg_revlib-AR ro
initrd /initramfs-linux.img
...
So, which is it ?. Is there a bootloader installed in the Arch partition or not ?.
If not, you can't chainload to it, and likewise you can't use "root (hd0,2)" (even in the CentOS menu.lst) to refer to it if it ain't there.

If you have indeed copied the Arch kernel/initrd to the Centos boot partition, I would expect the following to work - once you correct the typos for the root parameter (the kernel one, not the grub parameter).
Code:
title Arch2
root (hd0,0)
kernel /vmlinuz-linux cryptdevice=/dev/sda2:root rot/dev/mapper/vg_revlib-AH ro
initrd /initrafms-linux.img
To save a lot of guess work, go get bootinfoscript and post the RESULTS.txt it generates. Should work ok in a guest, but I don't think I've tried it.
 
Old 06-30-2012, 10:33 PM   #4
Novalight
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hmmm, sound's plausible. I installed GRUB to get the boot stuff on the /boot partition, but not the bootloader itself on the final step because I thought it would overwrite the MBR on the device and thus make the CentOS distro stop working... I could try that though since it's a VM.

Before I do that, though, I'll try the corrections you suggested and post the results here the next time I get the chance to have at the system. Thanks for the sugestions!
 
Old 06-30-2012, 11:27 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,318

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
Yeah, I thought about that after I posted. There are two different actions that are described as "installing" a boot-loader - the software install, and the "install" (setup) to the MBR.

Personally, for other than the first system, I prefer to install (setup) the loader to the boot record on the boot/root partition and chainload it. That way the systems maintain there own environment. You could achieve that by booting the Arch CD, then chroot into the installed (Arch) system and run setup to (hd0,2). The you can simply chainload to it from CentOS.
 
Old 07-02-2012, 11:43 PM   #6
Novalight
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Sweet! That sounds so much simpler and way less time consuming!

I'm going to try that right now, I'll post back after I see how it runs.


It works amazingly! Thanks so much!


The first run didn't work, but reformatting and reinstalling everything and configuring the setup to chainload specifically got it working

(I just realized that the kernel line had / mapped to the /home volume instead of the / volume....)


I just had to change my GRUB menu on Arch's /boot partition to look like this:

title Arch
root (hd0,2)
kernel /vmlinuz-linux root=/dev/mapper/vg-ArchR cryptdevice=/dev/sda2:LVM ro
initrd /initrafms-linux.img

(After reformatting I changed 'vg_revlib' to 'vg' and 'AH' to 'ArchR')




It boots great now! Thanks!

Last edited by Novalight; 07-03-2012 at 02:43 AM. Reason: Save post numbers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
arch linux system hangs after some time, nothing in logs bschiett Arch 1 02-22-2012 11:34 AM
[SOLVED] Help me with Arch Linux and Windows XP dualboot, grub.cfg messed!! p3ini Linux - Newbie 4 06-11-2011 03:22 PM
[SOLVED] CentOS 5.4 / Grub issue? System hangs on boot Xyan Red Hat 12 04-26-2010 03:15 PM
[SOLVED] archlinux.mirrors.uk2.net Arch mirror is not up to date. cantab Arch 2 01-18-2010 10:46 PM
CentOS 5.2 hangs booting from LILO stehman Red Hat 3 01-31-2009 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration