You are not logged in.
Hi all,
I have set up a concurrent 32 and 64 bit arch install on my system. I partitioned my system to have 5 partitions:
boot
32bit root
64bit root
swap
home
(64 bit root and home in an extended partition)
I renamed the 64 bit kernel files in /boot to
kernel26_64.img
kernel26-fallback_64.img
System_64.map26
vmlinuz26_64
the 32 bit kernel files have their 'normal' names
kernel26.img
kernel26-fallback.img
System.map26
vmlinuz26
Then I changed grubs menu.lst accordingly to either boot the 32 or 64 bit installation, both using same swap and home partition. This works by now. But if I want to upgrade my kernel through pacman, the 64 bit install will overwrite the 32bit kernel files because it generates the 'normal' filenames which belong to the 32bit installation. Is there a way to tell mkinitcpio to build files with a *_64 at the end while run by pacman -Syu?
Does anybody see other caveats? Are there other solutions to archieve my goal?
Harvey
Last edited by Harey (2009-11-11 21:38:41)
Linux is like a wigwam: No Gates, no Windows and an Apache inside
Offline
You don't need to have a separate boot partition for the 64 bit system. It says in a lot of documentation that your boot partition needs to be a primary partition, but from my experience that's only true for the boot partition from where you install grub. My guess is that it's grub's stage files that need to be on a primary partition. After they have been loaded, grub is then able to boot from an extended partition.
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
You can change the name of the initcpio images in /etc/mkinitcpio.d/kernel26.preset. To change the name of the kernel itself (vmlinuz26), you'll have to compile your own kernel. Well, not quite; this untested PKGBUILD I whipped up just repackages the official 64-bit kernel, with important names changed:
#pkgname=kernel26 # Build stock -ARCH kernel
pkgname=kernel26-64 # Build kernel with a different name
_kernelname=${pkgname#kernel26}
_basekernel=2.6.31
pkgver=${_basekernel}.6
pkgrel=1
_patchname="patch-${pkgver}-${pkgrel}-ARCH"
pkgdesc="The Linux Kernel and modules"
arch=(x86_64)
license=('GPL2')
groups=('base')
url="http://www.kernel.org"
backup=(etc/mkinitcpio.d/${pkgname}.preset)
depends=('coreutils' 'kernel26-firmware>=2.6.31' 'module-init-tools' 'mkinitcpio>=0.5.20')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
provides=('kernel26')
conflicts=('kernel26')
replaces=('kernel26' 'kernel24' 'kernel24-scsi' 'kernel26-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500')
install=kernel26.install
source=(ftp://ftp.archlinux.org/core/os/x86_64/kernel26-${pkgver}-${pkgrel}-x86_64.pkg.tar.gz)
optdepends=('crda: to set the correct wireless channels of your country')
md5sums=('d017c2cd05530d8ac47c5f95495c5d49')
sha256sums=('8f04074814ae0f697edcec2b1d215d3790746acb154604f2b223f32fa71c6434')
build() {
cp -r ${srcdir}/boot ${pkgdir} || return 1
cp -r ${srcdir}/etc ${pkgdir} || return 1
cp -r ${srcdir}/lib ${pkgdir} || return 1
cp -r ${srcdir}/usr ${pkgdir} || return 1
mv ${pkgdir}/boot/{vmlinuz26,vmlinuz26_64} || return 1
mv ${pkgdir}/boot/{System.map26,System_64.map26} || return 1
sed -i 's/\.img/_64\.img/g' ${pkgdir}/etc/mkinitcpio.d/kernel26.preset || return 1
}
Offline
First of all, thanks for your answers.
@ grey: I don't have a second /boot partition, only root partitions are divided.
@tavianator: To be honest this seems to be a bit of a hassle only to rename four files...
When pacman upgrades the kernel package, the initrd images kernel26.img and kernel26-fallback.img are rebuild and vmlinuz is replaced. The names for the files are my problem.
Meanwhile I changed my described solution to apply a '_32' or '_64' to the upgraded files. I do this with mc by now which is a fairly straight forward procedure and not very time consuming. But I have to pay attention to this myself each time the kernel package is updated in either 32 or 64 bit arch.
I wanted to automate this process. Changing /etc/mkinitcpio.d/kernel26.preset in each root leads me to an automation concerning kernel26.img and kernel26-fallback.img. This is half the way. But the filename 'vmlinuz' and 'System.map26' seems to be hardcoded. Do I miss something here?
Harvey
Linux is like a wigwam: No Gates, no Windows and an Apache inside
Offline
I know you're not having a second boot partition for 64 bit arch. My suggestion was to to have the arch 64 boot/ directory inside the arch 64 root partition. So your partitions would be:
32bit boot
32bit root
64bit root
swap
home
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
I know you're not having a second boot partition for 64 bit arch. My suggestion was to to have the arch 64 boot/ directory inside the arch 64 root partition.
I'm sorry for misunderstanding the meaning of your post. But your solution is not applicable in my case because I want to encrypt anything else than /boot following this wiki:
http://wiki.archlinux.org/index.php/Sys … r_dm-crypt
So /boot would not be accessible for grub if it is on the encrypted 64bit root.
Harvey
Linux is like a wigwam: No Gates, no Windows and an Apache inside
Offline