[gentoo-user] revdep-rebuild ignoring Ctrl-C
Hi list, just discovered something slightly unexpected. I am on gentoolkit-0.3.0.7. I started running revdep-rebuild on the console. The process starts, found the broken deps, and started with the emerge. Before it starts the emerge process, I can interrupt revdep-rebuild with Ctrl-C After it starts the emerge process, hitting Ctrl-C on the console drops me to bash, but evidently the emerge / revdep-rebuild continues running. (The processes live on and continue to compile and spew messages on the console.) I honestly don't remember whether it has always been like this or is this some new behaviour on my computer. But it is somewhat annoying (just discovered that earlier when I suddenly needed to pack up and go in a rush). Thoughts? W -- Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire et vice versa ~~~ I. Newton
Re: [gentoo-user] revdep-rebuild ignoring Ctrl-C
On Thu, 6 Dec 2012 09:35:30 +0100, Willie WY Wong wrote: > Before it starts the emerge process, I can interrupt revdep-rebuild > with Ctrl-C > > After it starts the emerge process, hitting Ctrl-C on the console > drops me to bash, but evidently the emerge / revdep-rebuild continues > running. (The processes live on and continue to compile and spew > messages on the console.) This sounds like the bug where Ctrl-C while emerging in a chroot exits the chroot but leaves the emerge running. There was a bug on this but I couldn't find it in a quick search. I think it may have been Volker that reported it. -- Neil Bothwick Do Roman paramedics refer to IV's as "4's"? signature.asc Description: PGP signature
[gentoo-user] hard disk name changes within initramfs
Hi, on one of several machines I have a problem with initramfs. The machine has a single SATA drive. When the kernel boots it shows that it is called /dev/sda, Now, within the init script of my initramfs it tries to mount /dev/sda2 as root but fails. Since the initramfs spawns a shell (busybox) I can see the device files for /dev/sda? but fdisk /dev/sda fails. As it turns out, the harddisk is now named /dev/sdb with /dev/sdb? partition names. Since this setup is identical to that of several other machines where it just works, I'm puzzled. Has anybody an idea what might be going on? Many thanks, Helmut. This is my init script #!/bin/busybox sh rescue_shell() { echo "$@" echo "Something went wrong. Dropping you to a shell." busybox --install -s exec /bin/sh } uuidlabel_root() { for cmd in $(cat /proc/cmdline) ; do case $cmd in root=*) type=$(echo $cmd | cut -d= -f2) echo "Mounting rootfs" if [ $type == "LABEL" ] || [ $type == "UUID" ] ; then uuid=$(echo $cmd | cut -d= -f3) mount -o ro $(findfs "$type"="$uuid") /mnt/root else mount -o ro $(echo $cmd | cut -d= -f2) /mnt/root fi ;; esac done } check_filesystem() { # most of code coming from /etc/init.d/fsck local fsck_opts= check_extra= RC_UNAME=$(uname -s) # FIXME : get_bootparam forcefsck if [ -e /forcefsck ]; then fsck_opts="$fsck_opts -f" check_extra="(check forced)" fi echo "Checking local filesystem $check_extra : $1" if [ "$RC_UNAME" = Linux ]; then fsck_opts="$fsck_opts -C0 -T" fi trap : INT QUIT # using our own fsck, not the builtin one from busybox /sbin/fsck ${fsck_args--p} $fsck_opts $1 case $? in 0) return 0;; 1) echo "Filesystem repaired"; return 0;; 2|3)if [ "$RC_UNAME" = Linux ]; then echo "Filesystem repaired, but reboot needed" reboot -f else rescue_shell "Filesystem still have errors; manual fsck required" fi;; 4) if [ "$RC_UNAME" = Linux ]; then rescue_shell "Fileystem errors left uncorrected, aborting" else echo "Filesystem repaired, but reboot needed" reboot fi;; 8) echo "Operational error"; return 0;; 12) echo "fsck interrupted";; *) echo "Filesystem couldn't be fixed";; esac rescue_shell } # temporarily mount proc and sys mount -t proc none /proc mount -t sysfs none /sys echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s # only do this if you've built devtmpfs support into your kernel # mount -t devtmpfs none /dev HJ: done by the kernel itself # disable kernel messages from popping onto the screen echo 0 > /proc/sys/kernel/printk # clear the screen # clear # == start doing stuff # mounting rootfs on /mnt/root uuidlabel_root || rescue_shell "Error with uuidlabel_root" btrfs device scan # space separated list of mountpoints that ... mountpoints="/usr" # ... we want to find in /etc/fstab ... # ln -s /mnt/root/etc/fstab /etc/fstab # ... to check filesystems and mount our devices. for m in $mountpoints ; do check_filesystem $m echo "Mounting $m" # mount the device and ... mount $m || rescue_shell "Error while mounting $m" # ... move the tree to its final location mount --move $m "/mnt/root"$m || rescue_shell "Error while moving $m" done echo "All done. Switching to real root." # == end doing stuff mount -o remount,rw /mnt/root cp /proc/mounts /mnt/root/mtab # clean up. The init process will remount proc sys and dev later umount /proc umount /sys # umount /dev # fails, since it's automounted by the kernel # switch to the real root and execute init exec switch_root /mnt/root /sbin/init "$@"
Re: [gentoo-user] hard disk name changes within initramfs
* Helmut Jarausch [121206 09:27]: > Hi, > > on one of several machines I have a problem with initramfs. > > The machine has a single SATA drive. When the kernel boots it shows > that it is called /dev/sda, > Now, within the init script of my initramfs it tries to mount /dev/sda2 > as root but fails. > Since the initramfs spawns a shell (busybox) I can see the device files > for /dev/sda? > but fdisk /dev/sda fails. > As it turns out, the harddisk is now named /dev/sdb with /dev/sdb? > partition names. [..] I can't tell you why it changed but after my device names got messed around with (after an upgrade) and the next boot mounted /home on /tmp and an initscript blew away a bunch of home directories before I caught it I switched to mounting via UUID. Once you find the UUID to use it's easy and alleviates lots of problems in the future. Todd
Re: [gentoo-user] hard disk name changes within initramfs
On Thu, Dec 6, 2012 at 8:31 AM, Todd Goodman wrote: > Once you find the UUID to use it's > easy and alleviates lots of problems in the future. I agree. Depending on your setup and bootloader you may need to use labels instead of UUID. /sbin/blkid can tell you the names, labels and UUIDs for all of your block devices/partitions.
Re: [gentoo-user] hard disk name changes within initramfs
Helmut Jarausch wrote: >Hi, > >on one of several machines I have a problem with initramfs. > >The machine has a single SATA drive. When the kernel boots it shows >that it is called /dev/sda, >Now, within the init script of my initramfs it tries to mount /dev/sda2 > >as root but fails. >Since the initramfs spawns a shell (busybox) I can see the device files > >for /dev/sda? >but fdisk /dev/sda fails. >As it turns out, the harddisk is now named /dev/sdb with /dev/sdb? >partition names. > >Since this setup is identical to that of several other machines where >it just works, >I'm puzzled. > >Has anybody an idea what might be going on? > >Many thanks, >Helmut. > >This is my init script > >#!/bin/busybox sh > >rescue_shell() { > echo "$@" > echo "Something went wrong. Dropping you to a shell." > busybox --install -s > exec /bin/sh >} > >uuidlabel_root() { > for cmd in $(cat /proc/cmdline) ; do > case $cmd in > root=*) > type=$(echo $cmd | cut -d= -f2) > echo "Mounting rootfs" > if [ $type == "LABEL" ] || [ $type == "UUID" ] ; then > uuid=$(echo $cmd | cut -d= -f3) > mount -o ro $(findfs "$type"="$uuid") /mnt/root > else > mount -o ro $(echo $cmd | cut -d= -f2) /mnt/root > fi > ;; > esac > done >} > >check_filesystem() { > # most of code coming from /etc/init.d/fsck > > local fsck_opts= check_extra= RC_UNAME=$(uname -s) > > # FIXME : get_bootparam forcefsck > if [ -e /forcefsck ]; then > fsck_opts="$fsck_opts -f" > check_extra="(check forced)" > fi > > echo "Checking local filesystem $check_extra : $1" > > if [ "$RC_UNAME" = Linux ]; then > fsck_opts="$fsck_opts -C0 -T" > fi > > trap : INT QUIT > > # using our own fsck, not the builtin one from busybox > /sbin/fsck ${fsck_args--p} $fsck_opts $1 > > case $? in > 0) return 0;; > 1) echo "Filesystem repaired"; return 0;; > 2|3)if [ "$RC_UNAME" = Linux ]; then > echo "Filesystem repaired, but reboot needed" > reboot -f > else > rescue_shell "Filesystem still have errors; >manual fsck required" > fi;; > 4) if [ "$RC_UNAME" = Linux ]; then > rescue_shell "Fileystem errors left >uncorrected, aborting" > else > echo "Filesystem repaired, but reboot needed" > reboot > fi;; > 8) echo "Operational error"; return 0;; > 12) echo "fsck interrupted";; > *) echo "Filesystem couldn't be fixed";; > esac > rescue_shell >} > ># temporarily mount proc and sys >mount -t proc none /proc >mount -t sysfs none /sys > >echo /sbin/mdev > /proc/sys/kernel/hotplug >mdev -s > ># only do this if you've built devtmpfs support into your kernel ># mount -t devtmpfs none /dev HJ: done by the kernel itself > ># disable kernel messages from popping onto the screen >echo 0 > /proc/sys/kernel/printk > ># clear the screen ># clear > > ># == start doing stuff > ># mounting rootfs on /mnt/root >uuidlabel_root || rescue_shell "Error with uuidlabel_root" > >btrfs device scan > ># space separated list of mountpoints that ... >mountpoints="/usr" > ># ... we want to find in /etc/fstab ... ># ln -s /mnt/root/etc/fstab /etc/fstab > ># ... to check filesystems and mount our devices. >for m in $mountpoints ; do > check_filesystem $m > > echo "Mounting $m" > # mount the device and ... > mount $m || rescue_shell "Error while mounting $m" > > # ... move the tree to its final location >mount --move $m "/mnt/root"$m || rescue_shell "Error while moving >$m" >done > >echo "All done. Switching to real root." > ># == end doing stuff > >mount -o remount,rw /mnt/root >cp /proc/mounts /mnt/root/mtab > ># clean up. The init process will remount proc sys and dev later >umount /proc >umount /sys ># umount /dev # fails, since it's automounted by the kernel > ># switch to the real root and execute init >exec switch_root /mnt/root /sbin/init "$@" Did you have anything connected via USB? Or maybe a CD/DVD? Am thinking something got detected first. Solution could be to put non-boot devices (like usb-storage) as modules. -- Joost -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Re: [gentoo-user] hard disk name changes within initramfs
Many thanks to Todd, Paul and J. Roeleveld. I have replaced device names like /dev/sda1 by UUIDs in my fstab which I have copied to /usr/src/initramfs/etc, as well. Having rebuild the kernel (with an integrated initramfs) seems to work. Thanks again, Helmut.
Re: [gentoo-user] openconnect and network manager
no have you installed the networkmanager-openconnect plugin? as a side note, i solved the problem by reloading the dbus service which fixed the permissions issued i was having On Thu, Dec 6, 2012 at 9:41 AM, Patrick Holthaus < patrick.holth...@uni-bielefeld.de> wrote: > Hey Kevin, > > Sorry, I can't help you with your problem. I'm also having issues with > openconnect and networkmanager. The problem for me is that openconnect vpn > devices won't even show up in the networkmanagement tool (kde). Did you > expeirience similar? > > Thank you for your help. > > -- > Regards > Patrick
Re: [gentoo-user] continue an installation
coorect, you could concievable run something like ebuild ebuildname qmerge if all the steps have been completed -Kevin On Thu, Dec 6, 2012 at 1:44 AM, Alan McKinnon wrote: > On Thu, 6 Dec 2012 08:45:10 +0100 > Willie WY Wong wrote: > > > Hi list, > > > > Suppose that I tried to emerge a package, and the compilation phase > > went through without problems, but it got stopped in the installation > > phase. Is there a way to (after I fixed the problem) to tell portage > > to install the (now all already compiled binaries sitting in > > /var/tmp/portage) directly without having to redo the compiling > > phase? > > not with emerge, but you can use the lower-level command ebuild for > that. > > portage & ebuild are analogous to yum & rpm or to apt* and dpkg > > man ebuild for more info > > > > > Case in point: > > > > I just tried to update dev-lib/boost to 1.52. The compilation went > > without a hitch, but the installation died because of file collision > > against (I think) boost-1.49.0-r1000. Now that the colliding files are > > no longer there, is there a way to tell portage to go ahead an install > > boost-1.52 from the compiled sources in /var/tmp/portage ? > > > > Thanks, > > > > W > > > > -- > Alan McKinnon > alan.mckin...@gmail.com > > >