[gentoo-user] Dmesg for Previous Boot?
Hi, Is it possible to get the dmesg for the boot prior to the current one? I'm trying to remotely upgrade from the 2.4 to 2.6 kernel. I followed the migration guide, but I got something wrong because my server didn't come back up after reboot. Fortunately I used lilo -R to boot to the 2.6 kernel, so using remote power cycle I was able to get back to my working 2.4. The problem is now I have no idea how to tell what went wrong? Thanks, Ian -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Dmesg for Previous Boot?
Richard Fish wrote: > Jerry McBride wrote: > > FYI, the bootmisc init script already does this for you, or at least it > does with the ~x86 baselayout. Just "rc-update -a bootmisc boot" if it > isn't already turned on. > > Also, syslog-ng will dump the kernel log to /var/log/messages when it > starts up. I don't know about other loggers, but they should do > something similar. > > Of course, none of that helps you if your root filesystem doesn't mount! > > -Richard > Thanks to all for the replies. It seems my filesystem isn't coming up as there is no evidence of the boot anywhere under /var/log. Guess I'll need to have the NOC console in. I did find an old thread on the Linux Kernel list that discusses the subject: http://www.linuxhq.com/lnxlists/linux-kernel/lk_9905_01/index.html#00404 The only implementation I found was: http://w.ods.org/tools/kmsgdump/ But that requires a floppy, which my server doesn't have. ~Ian -- gentoo-user@gentoo.org mailing list
[gentoo-user] Gentoo Sources 2.4.28-r9 and DevFS
Upon trying to boot a gentoo-sources-2.4.28-r9 kernel the NOC tells me I get an error to the effect of the Gentoo init system can't get devfs or udev up and running (sorry for not having the exact text of the error, it was summarized to me over the phone). I built the kernel via make oldconfig from my working gentoo-sources-2.4.25_pre7-r2. I tried make menuconfig, and oddly enough /dev is not listed under filesystems. I checked the base .config and the entries are there but not set... # CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_MOUNT is not set I enabled them manually, tried make dep && make bzImage, but got the errors pasted below. I checked the bug tracker and it appears that someone had the exact same problem against gentoo-sources-2.4.20-r2: http://bugs.gentoo.org/show_bug.cgi?id=17973 Except their solution, cleaning out distfiles and remerging gentoo-sources-2.4.28-r9 didn't clear this up for me. Any ideas? Thanks, Ian make -C devfs make[2]: Entering directory `/usr/src/linux-2.4.28-gentoo-r9/fs/devfs' make all_targets make[3]: Entering directory `/usr/src/linux-2.4.28-gentoo-r9/fs/devfs' gcc -D__KERNEL__ -I/usr/src/linux-2.4.28-gentoo-r9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-mp-nostdinc -iwithprefix include -DKBUILD_BASENAME=base -DEXPORT_SYMTAB -c base.c base.c:911: error: redefinition of `devfs_put' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:130: error: `devfs_put' previously defined here base.c:1549: error: redefinition of `devfs_register' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:140: error: `devfs_register' previously defined here base.c:1716: error: redefinition of `devfs_unregister' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:144: error: `devfs_unregister' previously defined here base.c:1794: error: redefinition of `devfs_mk_symlink' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:150: error: `devfs_mk_symlink' previously defined here base.c:1824: error: redefinition of `devfs_mk_dir' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:155: error: `devfs_mk_dir' previously defined here base.c:1887: error: redefinition of `devfs_get_handle' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:164: error: `devfs_get_handle' previously defined here base.c:1898: error: redefinition of `devfs_find_handle' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:173: error: `devfs_find_handle' previously defined here base.c:1916: error: redefinition of `devfs_get_flags' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:177: error: `devfs_get_flags' previously defined here base.c:1942: error: redefinition of `devfs_set_flags' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:181: error: `devfs_set_flags' previously defined here base.c:1967: error: redefinition of `devfs_get_maj_min' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:186: error: `devfs_get_maj_min' previously defined here base.c:1986: error: redefinition of `devfs_get_handle_from_inode' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:190: error: `devfs_get_handle_from_inode' previously defined here base.c:2005: error: redefinition of `devfs_generate_path' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:195: error: `devfs_generate_path' previously defined here base.c:2036: error: redefinition of `devfs_get_ops' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:199: error: `devfs_get_ops' previously defined here base.c:2067: error: redefinition of `devfs_put_ops' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:203: error: `devfs_put_ops' previously defined here base.c:2091: error: redefinition of `devfs_set_file_size' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:207: error: `devfs_set_file_size' previously defined here base.c:2111: error: redefinition of `devfs_get_info' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:211: error: `devfs_get_info' previously defined here base.c:2126: error: redefinition of `devfs_set_info' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:215: error: `devfs_set_info' previously defined here base.c:2141: error: redefinition of `devfs_get_parent' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:219: error: `devfs_get_parent' previously defined here base.c:2156: error: redefinition of `devfs_get_first_child' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:223: error: `devfs_get_first_child' previously defined here base.c:2172: error: redefinition of `devfs_get_next_sibling' /usr/src/linux-2.4.28-gentoo-r9/include/linux/devfs_fs_kernel.h:227: error: `devfs_get_next_sibling' previously defined here base.c:2188: error: redefinition of `devfs_auto_unregister' /usr/src/linux-2.4.28-gentoo-r9
[gentoo-user] udev Migration and SCSI
Hi, I'm trying to remotely upgrade my server from gentoo-sources-2.4.25_pre7-r2 to gentoo-sources-2.6.13-r9, i.e. from devfs to udev. My root partition is on a RAID 1 mirror on an Adaptec 2100S. My existing fstab is below. It was summarized to me by the NOC over the phone, so I don't have the exact text of the startup error, but it is something to the effect of... /dev/scsi/host0/bus0/target0/lun0/part3 not found I'm guessing that udev is tweaking the naming scheme a bit, as warned under "No Consistent Naming between DevFS and udev" in the Gentoo udev Guide. So two questions: 1) How can I tell what the new name is going to be? 2) As I'm doing this upgrade remotely, how can I set up to fail back to my udev-less 2.4.25 kernel should 2.6.13 still fail to come up? In other words, if I change fstab to be udev specific won't that leave me dead in the water? Thanks! Ian # /etc/fstab: static file system information. # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $ # # noatime turns off atimes for increased performance (atimes normally aren't # needed; notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail and tail freely. # # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/scsi/host0/bus0/target0/lun0/part1 /boot ext3 noauto,noatime 1 2 /dev/scsi/host0/bus0/target0/lun0/part3 / reiserfsnoatime 0 1 /dev/scsi/host0/bus0/target0/lun0/part2 noneswap sw 0 0 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 #/dev/fd0 /mnt/floppy autonoauto 0 0 # NOTE: The next line is critical for boot! none/proc procdefaults 0 0 # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for # POSIX shared memory (shm_open, shm_unlink). # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will # use almost no memory if not populated with files) # Adding the following line to /etc/fstab should take care of this: none/dev/shmtmpfs defaults 0 0 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI
Mike Williams wrote: > > I'd imagine /dev/sdXY will exist under both udev and devfs, and be the same, > they certainly always have done for me. For whatever reason I couldn't get /dev/sda3 in fstab to work when I originally installed Gentoo on this box many moons ago, I had to use /dev/scsi/host0/bus0/target0/lun0/part3. I never did figure out why. An ls yeilds: # ls -al /dev/sd* lr-xr-xr-x 1 root root 33 Oct 18 16:15 /dev/sda -> scsi/host0/bus0/target0/lun0/disc lr-xr-xr-x 1 root root 34 Oct 18 16:15 /dev/sda1 -> scsi/host0/bus0/target0/lun0/part1 lr-xr-xr-x 1 root root 34 Oct 18 16:15 /dev/sda2 -> scsi/host0/bus0/target0/lun0/part2 lr-xr-xr-x 1 root root 34 Oct 18 16:15 /dev/sda3 -> scsi/host0/bus0/target0/lun0/part3 Is there some reason the symbolic links wouldn't have worked? My fear is if I change my root in fstab to /dev/sda3 my 2.4 kernel won't come back up, and at $125/hr I'm really trying to avoid getting the NOC involved. Is there any way to determine/test whether the configuration is going to work under devfs and/or udev without actually rebooting? After editing /etc/fstab to /dev/sdaX I tried: # mount -fav And all it said was: mount: none already mounted on /dev/shm none on /proc type proc (rw) But is that a true test of whether it is going to work on reboot? > fstab doesn't have to take block devices, it can take labels too, you could > look into labeling your partitions. I'll look into that, but same question applies, is it possible to verify my changes before I reboot? Thanks Again! Ian -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI
Mike Williams wrote: > Kinda, yes. > Add /dev/sdXY entries, but under someother directory, /mnt/gentoo for example. > i.e. > > /dev/sda3 /mnt/gentoo auto noatime 0 1 > /dev/sda1 /mnt/gentoo/boot auto ro,noatime 0 0 > etc, etc > > The mount -a, and see what happens. Great suggestion. Trying it I got a rather odd result: # mount -av mount: /dev/sda3 already mounted on /mnt/gentoo/ mount: none already mounted on /dev/shm mount: mount point /mnt/gentoo/boot does not exist My main curiosity is the first one. If I check there is no /mnt/gentoo... # ls -al /mnt/ total 4 drwxr-xr-x 7 root root 192 Oct 20 12:20 . drwxr-xr-x 20 root root 480 Jan 5 2005 .. drwxr-xr-x 13 root root 344 Nov 5 2002 .init.d -rw-r--r-- 1 root root 0 Oct 22 2004 .keep drwx-- 2 root root 72 Feb 26 2004 cdrom drwx-- 2 root root 72 Feb 26 2004 floppy drwxr-xr-x 2 root root 48 Jan 8 2004 lfs So how could /dev/sda3 already be mounted there? I tried creating a new path, /mnt/boottest and /mnt/boottest/boot, and I get the same thing: mount -av mount: /dev/sda1 already mounted on /mnt/boottest/boot mount: /dev/sda3 already mounted on /mnt/boottest/ But again if I look under /mnt/boottest and /mnt/boottest/boot they're both empty? And attempts to umount fail: # umount /mnt/boottest/boot umount: /dev/sda1: not mounted umount: /dev/sda1: not mounted umount /mnt/boottest/ umount: /dev/sda3: not mounted umount: /dev/sda3: not mounted Also, with this method of test, can I test mounting swap from /dev/sda2? In my existing fstab sda2 is mounted to "none". Does it make sense to do the following?... /dev/sda2/mnt/gentoo/swapswapsw0 0 Thanks, Ian -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI
John Jolet wrote: > what does "cat /proc/mounts" say? # cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / reiserfs rw,noatime 0 0 none /dev devfs rw 0 0 proc /proc proc rw 0 0 none /dev/shm tmpfs rw 0 0 /dev/scsi/host0/bus0/target0/lun0/part1 /boot ext3 rw,noatime 0 0 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI
John Jolet wrote: > okay, and does that agree with /etc/mtab? Not exactly: # cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / reiserfs rw,noatime 0 0 none /dev devfs rw 0 0 proc /proc proc rw 0 0 none /dev/shm tmpfs rw 0 0 /dev/scsi/host0/bus0/target0/lun0/part1 /boot ext3 rw,noatime 0 0 # cat /etc/mtab /dev/scsi/host0/bus0/target0/lun0/part3 / reiserfs rw,noatime 0 0 none /dev devfs rw 0 0 proc /proc proc rw 0 0 none /dev/shm tmpfs rw 0 0 /dev/scsi/host0/bus0/target0/lun0/part1 /boot ext3 rw,noatime 0 0 /dev/sda3 /mnt/gentoo/ reiserfs rw,noatime 0 0 Also, just fyi: # ls -al /dev/root lr-xr-xr-x 1 root root 34 Oct 18 16:15 /dev/root -> scsi/host0/bus0/target0/lun0/part3 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI
Mike Williams wrote: > Interesting... > A 'cat /proc/mounts' like John suggest would be helpful, before and after > attempting to mount stuff, also try the mount manually. > mount /dev/sda3 /mnt/somethingthatexistsbutisntbeingused. The manual mount worked: # cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / reiserfs rw,noatime 0 0 none /dev devfs rw 0 0 proc /proc proc rw 0 0 none /dev/shm tmpfs rw 0 0 /dev/scsi/host0/bus0/target0/lun0/part1 /boot ext3 rw,noatime 0 0 # mount -v /dev/sda3 /mnt/boottest/ mount: you didn't specify a filesystem type for /dev/sda3 I will try type reiserfs /dev/sda3 on /mnt/boottest type reiserfs (rw) # cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / reiserfs rw,noatime 0 0 none /dev devfs rw 0 0 proc /proc proc rw 0 0 none /dev/shm tmpfs rw 0 0 /dev/scsi/host0/bus0/target0/lun0/part1 /boot ext3 rw,noatime 0 0 /dev/sda3 /mnt/boottest reiserfs rw,noatime 0 0 > No, as swap isn't "mounted", you can easily live without swap for a while > though, so just comment it out. Ah yes. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI
Mike Williams wrote: > OK great, I'd change my fstab, and reboot to 2.4.X/devfs now, but I'm known > for being a little gungho :) Well, guess there's not much more I can do. Supposing it doesn't come up, would a rescue CD be required to fix it? I left a copy of the old /etc/fstab as /etc/fstab.bak, and setup a login with sudo rights to perform the copy, but if the discs don't come up, will login be possible? (I remember the NOC saying there was a prompt, "enter the root password for maintenance", or something like that after a previous failure to boot the 2.6 kernel where the issue was the Adaptec RAID and general kernel I2O drivers clashing.) > > BTW, what path for root do you pass to grub? > I use lilo actually because it does everything I need, and it doesn't care that the discs are on a raid array. Grub at least used to require a special driver. My lilo.conf is below. So would I need to change my boot and root to the sdaX scheme as well? # cat /etc/lilo.conf boot=/dev/scsi/host0/bus0/target0/lun0/disc root=/dev/scsi/host0/bus0/target0/lun0/part3 map=/boot/System.map prompt timeout=50 lba32 vga=normal default=2.4.25 image=/boot/bzImage-2.4.25 label=2.4.25 read-only image=/boot/bzImage-2.4.28-gentoo-r9 label=2.4.28 read-only image=/boot/bzImage-2.6.13-gentoo-r3 label=2.6.13 read-only -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] udev Migration and SCSI -- SOLVED
Thanks to Mike and John for all their help. I learned a lot. I was able to change my lilo.conf and fstab from the /dev/scsi/hostW/busX/targetY/lunZ/* scheme to /dev/sdaX instead, and my 2.4 kernel came back up no problem. (I wish I could remeber what forced me into using the /dev/scsi scheme in the first place, but oh well.) With that change 2.6 came up as well. Thanks Again! Ian Ian Brandt wrote: > > Mike Williams wrote: > >>OK great, I'd change my fstab, and reboot to 2.4.X/devfs now, but I'm known >>for being a little gungho :) > > > Well, guess there's not much more I can do. > > Supposing it doesn't come up, would a rescue CD be required to fix it? > I left a copy of the old /etc/fstab as /etc/fstab.bak, and setup a > login with sudo rights to perform the copy, but if the discs don't > come up, will login be possible? (I remember the NOC saying there was > a prompt, "enter the root password for maintenance", or something like > that after a previous failure to boot the 2.6 kernel where the issue > was the Adaptec RAID and general kernel I2O drivers clashing.) > > >>BTW, what path for root do you pass to grub? >> > > > I use lilo actually because it does everything I need, and it doesn't > care that the discs are on a raid array. Grub at least used to > require a special driver. My lilo.conf is below. So would I need to > change my boot and root to the sdaX scheme as well? > > # cat /etc/lilo.conf > > boot=/dev/scsi/host0/bus0/target0/lun0/disc > root=/dev/scsi/host0/bus0/target0/lun0/part3 > > map=/boot/System.map > > prompt > timeout=50 > > lba32 > vga=normal > > default=2.4.25 > > image=/boot/bzImage-2.4.25 > label=2.4.25 > read-only > > image=/boot/bzImage-2.4.28-gentoo-r9 > label=2.4.28 > read-only > > image=/boot/bzImage-2.6.13-gentoo-r3 > label=2.6.13 > read-only -- gentoo-user@gentoo.org mailing list
[gentoo-user] Leftover sun-jdk folders safe to delete?
I noticed the sun-jdk ebuilds are leaving behind a directory in /opt after each update. I presume these are safe to delete? Thanks, Ian # cd /opt # ls -aR sun-jdk-1.4.2.0[4-8] sun-jdk-1.4.2.04: . .. .systemPrefs sun-jdk-1.4.2.04/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.4.2.05: . .. .systemPrefs sun-jdk-1.4.2.05/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.4.2.06: . .. .systemPrefs man sun-jdk-1.4.2.06/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.4.2.06/man: . .. sun-jdk-1.4.2.07: . .. .systemPrefs man sun-jdk-1.4.2.07/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.4.2.07/man: . .. sun-jdk-1.4.2.08: . .. .systemPrefs man sun-jdk-1.4.2.08/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.4.2.08/man: . .. # ls -aR sun-jdk-1.5.0.0[2-4] sun-jdk-1.5.0.02: . .. jre man sun-jdk-1.5.0.02/jre: . .. .systemPrefs sun-jdk-1.5.0.02/jre/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.5.0.02/man: . .. sun-jdk-1.5.0.03: . .. jre man sun-jdk-1.5.0.03/jre: . .. .systemPrefs sun-jdk-1.5.0.03/jre/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.5.0.03/man: . .. sun-jdk-1.5.0.04: . .. jre man sun-jdk-1.5.0.04/jre: . .. .systemPrefs sun-jdk-1.5.0.04/jre/.systemPrefs: . .. .system.lock .systemRootModFile sun-jdk-1.5.0.04/man: . .. -- gentoo-user@gentoo.org mailing list