Alfred von Campe
2007-Aug-20 19:23 UTC
[CentOS] HELP, I accidentally initialized my /boot partition
So I installed a second drive in my system today, and instead of typing "mkfs.ext3 /dev/sda1" I did a "mkfs.ext3 /dev/hda1". Fortunately, that was just my /boot partition. I thought I could just copy the contents from the /boot partition from another system, but that didn't work as expected. The again, I don't have another system that's identical to the mine. What is the best way to re-create the /boot partition for my system? Alfred
John R Pierce
2007-Aug-20 19:30 UTC
[CentOS] HELP, I accidentally initialized my /boot partition
Alfred von Campe wrote:> So I installed a second drive in my system today, and instead of > typing "mkfs.ext3 /dev/sda1" I did a "mkfs.ext3 /dev/hda1". > Fortunately, that was just my /boot partition. I thought I could just > copy the contents from the /boot partition from another system, but > that didn't work as expected. The again, I don't have another system > that's identical to the mine. > > What is the best way to re-create the /boot partition for my system?grub.conf will be the main problem... and possibly whats in the initrd if extra drivers need to be loaded to complete the boot (I believe this is built by mkinitrd) # ls -lR /boot /boot: total 9931 -rw-r--r-- 1 root root 62154 Jul 10 04:34 config-2.6.18-8.1.8.el5 -rw-r--r-- 1 root root 62150 Mar 15 17:19 config-2.6.18-8.el5 drwxr-xr-x 2 root root 1024 Jul 23 17:59 grub -rw------- 1 root root 2206532 Jul 23 17:59 initrd-2.6.18-8.1.8.el5.img -rw------- 1 root root 2206505 Jul 23 10:30 initrd-2.6.18-8.el5.img drwx------ 2 root root 12288 Jul 23 03:22 lost+found -rw-r--r-- 1 root root 80032 Apr 1 07:49 message -rw-r--r-- 1 root root 83542 Jul 10 04:34 symvers-2.6.18-8.1.8.el5.gz -rw-r--r-- 1 root root 83542 Mar 15 17:20 symvers-2.6.18-8.el5.gz -rw-r--r-- 1 root root 884809 Jul 10 04:34 System.map-2.6.18-8.1.8.el5 -rw-r--r-- 1 root root 884787 Mar 15 17:19 System.map-2.6.18-8.el5 -rw-r--r-- 1 root root 1765588 Jul 10 04:34 vmlinuz-2.6.18-8.1.8.el5 -rw-r--r-- 1 root root 1765428 Mar 15 17:19 vmlinuz-2.6.18-8.el5 /boot/grub: total 207 -rw-r--r-- 1 root root 63 Jul 23 10:32 device.map -rw-r--r-- 1 root root 7616 Jul 23 10:32 e2fs_stage1_5 -rw-r--r-- 1 root root 7456 Jul 23 10:32 fat_stage1_5 -rw-r--r-- 1 root root 6720 Jul 23 10:32 ffs_stage1_5 -rw------- 1 root root 738 Jul 23 17:59 grub.conf -rw-r--r-- 1 root root 6720 Jul 23 10:32 iso9660_stage1_5 -rw-r--r-- 1 root root 8192 Jul 23 10:32 jfs_stage1_5 lrwxrwxrwx 1 root root 11 Jul 23 10:32 menu.lst -> ./grub.conf -rw-r--r-- 1 root root 6880 Jul 23 10:32 minix_stage1_5 -rw-r--r-- 1 root root 9248 Jul 23 10:32 reiserfs_stage1_5 -rw-r--r-- 1 root root 5427 Apr 1 07:49 splash.xpm.gz -rw-r--r-- 1 root root 512 Jul 23 10:32 stage1 -rw-r--r-- 1 root root 104924 Jul 23 10:32 stage2 -rw-r--r-- 1 root root 7040 Jul 23 10:32 ufs2_stage1_5 -rw-r--r-- 1 root root 6272 Jul 23 10:32 vstafs_stage1_5 -rw-r--r-- 1 root root 8864 Jul 23 10:32 xfs_stage1_5
Ross S. W. Walker
2007-Aug-20 19:40 UTC
[CentOS] HELP, I accidentally initialized my /boot partition
> -----Original Message----- > From: centos-bounces at centos.org > [mailto:centos-bounces at centos.org] On Behalf Of Alfred von Campe > Sent: Monday, August 20, 2007 3:24 PM > To: CentOS mailing list > Subject: [CentOS] HELP, I accidentally initialized my /boot partition > > So I installed a second drive in my system today, and instead of > typing "mkfs.ext3 /dev/sda1" I did a "mkfs.ext3 /dev/hda1". > Fortunately, that was just my /boot partition. I thought I could > just copy the contents from the /boot partition from another system, > but that didn't work as expected. The again, I don't have another > system that's identical to the mine. > > What is the best way to re-create the /boot partition for my system?Just re-install the current kernel and grub with an rpm -Uvh --force. initrd images are auto-generated and grub should probe your disk layout and put some best-guess entries in there. Just edit menu.lst and fix the entries. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.