Re: Boot hangs in single-user mode
I have tracked down the issue. Not sure whether this is a PR issue or not... On 2013-06-06, at 11:18 AM, Polytropon wrote: On Thu, 6 Jun 2013 10:24:52 -0300, Andrew Hamilton-Wright wrote: Strangely, it seems that I cannot boot single user, either using boot -s from the boot loader, or using the boot menu. When I get to the point where the root filesystem is mounted, it hangs right after printing the message: Trying to mount root from ufs:/dev/ada0s1a Have you tried hitting the RETURN key several times? [ ... ] It's important to identify if the system is _really_ hanging, or if the message just isn't visible... This is indeed the crux of the issue. While hammering on the RETURN key did not produce a prompt, it turns out that there was a prompt... At some time in the relatively distant past, I had configured this machine to allow display to a serial console (long since disconnected) by adding these lines to /boot/loader.conf boot_multicons=YES boot_serial=YES comconsole_speed=19200 console=comconsole,vidconsole My notes say These came from the serial console setup page, and do work for vt100, however I did not note exactly which man page they came from, unfortunately. I do not see these lines on syscons(4), sio(4) or dcons(4). Similar lines are mentioned in the handbook regarding setting up a serial console (there is no mention of single-user mode here): http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html The issue, as it relates to single-user mode, is essentially this: if the system is configured to boot with multi-console options, then when the single user prompt is printed, it is only printed on the second console (which is also the only valid source of keyboard input) -- in this case, the configured but unattached serial port. I'm not sure what the best strategy is here. Having only one console that is accepting input for the single-user shell certainly makes sense. The question is, which of potentially several consoles should it be? IMO, it would be better/clearer if (for i386/amd64 anyway) the console was the one associated with the motherboard-based keyboard and video card. An argument here would be that the [CTRL]-[ALT]-[DEL] sequence is still valid when associated with this keyboard, so it does seem odd that other input on that device is ignored. I can see arguments for other setups, also, mostly revolving around the why would you _have_ another console configured if you didn't need it, so the configured console must therefore be the important one -- though the FreeBSD user base is certainly willing enough to experiment that I am sure I am not the only person who set up multi-console for a fun project. Perhaps the best strategy would be to add a message printed on all consoles (as the rest of the boot information is) just before the prompt is printed (singly) to let people know that this is happening? I'm not sure if a way to 100% predict the desired console is possible. Thoughts? If figure I will put a PR in, so that at least this is tracked, even if we don't change anything. I will reference this thread in the PR, but if anyone has input as to what to suggest, I would appreciate it. At the very least, the handbook should get updated to indicate that this may happen. Andrew. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Boot hangs in single-user mode
Hi Everyone, On Thu, 6 Jun 2013 10:24:52 -0300, Andrew Hamilton-Wright wrote: Strangely, it seems that I cannot boot single user, either using boot -s from the boot loader, or using the boot menu. When I get to the point where the root filesystem is mounted, it hangs right after printing the message: Trying to mount root from ufs:/dev/ada0s1a There was a bit of a delay getting back to this, as I needed to move the internals over to a replacement server in a planned upgrade. I have left the boot disk in the machine demonstrating this problem with the intention of coming back to determine what is going on (mount points to now-missing data disks have been removed from /etc/fstab). In the resulting stripped down system, I have the same behaviour as before -- I cannot get to single-user mode, but multi-user is fine. If in multi-user mode, if I issue kill -TERM 1 to go to single-user mode, I would get a single console message: pflog0: promiscuous mode disabled, then nothing. While I would expect pflog to shut down in this case, I have now disabled everything pf related (I cannot imagine that it would interfere with console operation), and now have the situation where kill -TERM 1 simply locks the console. Plugging in a USB device while the console is locked does produce the expected dmesg updates, and the system does respond to [CTRL]-[ALT]-[DEL] I will also add that I can boot to a single-user prompt when booting off of the 9.1 media via DVD and mounting the root filesystem from the disk. (This motherboard+kernel have never gotten along particularly well with the DVD reader/writer in the machine, so mounting the filesystem from the DVD usually fails with various atapi based timeouts). Does anyone have any thoughts on how to further explore this? As the situation was more than mildly annoying, and could certainly have been worse, if this is likely to occur for anyone else, I would like to file a PR. Thanks, Andrew. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Boot hangs in single-user mode
Strangely, it seems that I cannot boot single user, either using boot -s from the boot loader, or using the boot menu. When I get to the point where the root filesystem is mounted, it hangs right after printing the message: Trying to mount root from ufs:/dev/ada0s1a Interestingly, there seems to be a bit of a sequence issue, as I have also seen the mount message appear before the audio system comes up, so occasionally, the last item printed is: pcm0: USB audio on uaudio0 If I boot normally, however, I can consistently reach a login prompt. I suspect that this may be a race condition of some kind, as yesterday I am sure I successfully booted to single-user while trying to solve a separate problem. In case the separate problem (failed disk) is relevant, the general situation is this: - four disk machine: ada0 (/, /usr, /tmp, /var); ada1 (/research -- data only), ada2 (/home), ada3 (/data -- also data only) - the disk ada2 has failed - in preparing to replace ada2, I have commented out all references to it from /etc/fstab I am rebooting the machine at the moment as I wish to ensure that I know which physical disk is ada2, so want to boot the machine without it plugged in. I seem to have trouble booting at all with ada2 missing and ada3 still attached, but can boot to multiuser with no problems in either of these two configuration: - all disks (including the faulty one) plugged in, with ada2 references removed from /etc/fstab - ada2 and ada3 not physically plugged in, and all references to either removed from /etc/fstab Neither combination allows me to boot single-user. While I can clearly go ahead with my disk replacement, this is not only strange and annoying, but potentially problematic. Has anyone else seen anything like this? I notice that there are several messages (dating back to 2004) in the list indicating 'hang after Trying to mount root' or 'hang after sbin_init' (which is the message that will be seen when booting single-user in verbose mode). Thoughts? Ideas? Thanks, Andrew. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Boot hangs in single-user mode
On Thu, 6 Jun 2013 10:24:52 -0300, Andrew Hamilton-Wright wrote: Strangely, it seems that I cannot boot single user, either using boot -s from the boot loader, or using the boot menu. When I get to the point where the root filesystem is mounted, it hangs right after printing the message: Trying to mount root from ufs:/dev/ada0s1a Have you tried hitting the RETURN key several times? I've seen what you've described once (I think on a FreeBSD 5 system): The prompt Enter full pathname of shell or RETURN for /bin/sh: _ would not appear, but the system was still responding. Hitting RETURN made that prompt visible and the SUM shell prompt was properly displayed. It's important to identify if the system is _really_ hanging, or if the message just isn't visible... Interestingly, there seems to be a bit of a sequence issue, as I have also seen the mount message appear before the audio system comes up, so occasionally, the last item printed is: pcm0: USB audio on uaudio0 This seems to indicate that the system is still responding, i. e., the kernel is up and running. Whenever new hardware is detected, the kernel will issue a console message. For example, on my home system the detection of the built-in USB is sometimes a bit slow, so its messages appear later on in the booting sequence, _after_ the initial kernel messages (e. g., during firewall initialisation). I suspect that this may be a race condition of some kind, as yesterday I am sure I successfully booted to single-user while trying to solve a separate problem. Try some more. :-) I am rebooting the machine at the moment as I wish to ensure that I know which physical disk is ada2, so want to boot the machine without it plugged in. A suggestion: I tend to keep a tendency to use labels instead of device names to identify disks. This is handy in case you're running some kind of RAID configuration or use striping and mirroring. Mark the disks with numbers and colors, as you prefer (for example this nomenclature: color = stripe, number = mirror), to reflect being element of a stripe and being one of the mirrors of N properties both by the label (software) and the physical disk (hardware). So you can _directly_ deduct from a label (for example of a disk that is reported as failing) like red 2 that the disk is the 2nd mirror disk in the red stripe, and _which_ physical disk is it? The one with a red 2 on it. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Boot hangs in single-user mode
[ Condensation of earlier comments below ] On 2013-06-06, at 11:18 AM, Polytropon wrote: On Thu, 6 Jun 2013 10:24:52 -0300, Andrew Hamilton-Wright wrote: When I get to the point where the root filesystem is mounted, it hangs right after printing the message: Trying to mount root from ufs:/dev/ada0s1a Have you tried hitting the RETURN key several times? ... It's important to identify if the system is _really_ hanging, or if the message just isn't visible... I did try that -- I have seen that behaviour before too. I tried hitting return a half-dozen times, and have additionally tried waiting (up to 20 min) to see if it would come back, to no avail. Interestingly, there seems to be a bit of a sequence issue, as I have also seen the mount message appear before the audio system comes up, so occasionally, the last item printed is: pcm0: USB audio on uaudio0 This seems to indicate that the system is still responding, i. e., the kernel is up and running. Whenever new hardware is detected, the kernel will issue a console message. That is a good point -- I will try plugging in an external USB device at this point, and see what happens then. It certainly appears that the system is generally running to me, as well. I should also mention that the system does respond nicely to [CTRL]-[ALT]-[DEL], which triggers the expected reboot process. I am rebooting the machine at the moment as I wish to ensure that I know which physical disk is ada2, so want to boot the machine without it plugged in. A suggestion: I tend to keep a tendency to use labels instead of device names to identify disks. This is handy in case you're This is an excellent idea. I do follow some variant of this (however work at a high enough level of paranoia that I want to be able to perform the did the right drive disappear when I unplugged it check just to ensure that I wasn't asleep when making up the labels. ;-) Thanks for the suggestions -- I will keep looking at it, and will try adding a USB device once this restore eventually completes. Thanks, Andrew. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
Teske, Devin wrote: On Apr 28, 2013, at 3:44 PM, Joe wrote: running 9.1 and can not figure how to get into single user mode or safe mode from the BOOT menu. After hitting the 5 or 6 keys to select those options, what do you do next to continue? Based on your description it sounds like you have the following boot menu (regardless of color): http://twitpic.com/b1pkz1 Pressing 5 or 6 changes the status from off to On Hitting enter key just boots the system without regard to options selected. Pressing ENTER is supposed to boot with the displayed options. Yes this is what I was experiencing. Can not find usage of boot menu in the handbook. The 4th files are heavily documented in man-pages as well as by loader and boot manuals. -- Devin P.S. There have been enhancements already that will come down with 9.2 that add a top-level Boot single user mode option simply by pressing s -- thus making it like the boot menus of 6.x, 7.x, and 8.x (s to boot single user). Devin Background info. I had put load commands for ipfw modules into /boot/loader.conf to test if this would work with a kernel that has vimage compiled in. The boot process would start normally and progress to the point where the usb messages get displayed and them the system would freeze up becoming unresponsive. Figured I would just reboot and go in single user mode and remove the statements from loader.conf. But no matter what I tried the boot menu would no go into single user mode. The solution was to take a testing disk that had 9.1-rc3 on it and cable it as master and the original disk as slave. In this configuration the system booted correctly and I mounted the slave and corrected loader.conf. Recabled the original disk as master and was back in business. I think that because the ipfw modules were loaded before the boot process got to the boot menu is what caused the boot menu to not function correctly. Don't see a PR in this case. Thanks to all who replied. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On Apr 29, 2013, at 4:52 AM, Joe wrote: Teske, Devin wrote: On Apr 28, 2013, at 3:44 PM, Joe wrote: running 9.1 and can not figure how to get into single user mode or safe mode from the BOOT menu. After hitting the 5 or 6 keys to select those options, what do you do next to continue? Based on your description it sounds like you have the following boot menu (regardless of color): http://twitpic.com/b1pkz1 Pressing 5 or 6 changes the status from off to On Hitting enter key just boots the system without regard to options selected. Pressing ENTER is supposed to boot with the displayed options. Yes this is what I was experiencing. Can not find usage of boot menu in the handbook. The 4th files are heavily documented in man-pages as well as by loader and boot manuals. -- Devin P.S. There have been enhancements already that will come down with 9.2 that add a top-level Boot single user mode option simply by pressing s -- thus making it like the boot menus of 6.x, 7.x, and 8.x (s to boot single user). Devin Background info. I had put load commands for ipfw modules into /boot/loader.conf to test if this would work with a kernel that has vimage compiled in. The boot process would start normally and progress to the point where the usb messages get displayed and them the system would freeze up becoming unresponsive. Try compiling ipfw into your kernel by adding these great options… dte...@oos0a.lbxrich.vicor.commailto:dte...@oos0a.lbxrich.vicor.com ~ $ config -x `sysctl -n kern.bootfile`|grep -i ipf options IPFIREWALL # Enable support for `ipfw' options IPDIVERT # Enable support for `ipfw divert' options IPFIREWALL_NAT # Enable support for `ipfw nat' options IPFIREWALL_FORWARD # Enable transparent proxy support options IPFIREWALL_DEFAULT_TO_ACCEPT # Allow everything by default This is partly how we're using ipfw in vimage jails. NOTE: You might be wondering how exactly we got comments into our embedded configf-file… the secret is to manually configure your kernel with config -C -g MYGENERIC (replacing MYGENERIC with whatever your kernel config filename is). Figured I would just reboot and go in single user mode and remove the statements from loader.conf. But no matter what I tried the boot menu would no go into single user mode. Yet, it wasn't booting [fully to multiuser mode] either, correct? Quoting from above: The boot process would start normally and progress to the point where the usb messages get displayed and them (sic) the system would freeze up becoming unresponsive Well… It's not that the menu was ignoring your choice to enter single-user mode, it was that it couldn't make it to single-user mode. To make it to single-user mode you have to be able to invoke init(8) at the very least and it doesn't sound like you made it that far (let alone invoking /etc/rc and ilk). The solution was to take a testing disk that had 9.1-rc3 on it and cable it as master and the original disk as slave. I would have just dropped to the loader-prompt and used the built-in commands (not even any Forth, but easy-to-use loader commands that are documented in loader(8)): unload That will unload the kernel and your ipfw.ko that was loaded by your loader.conf preference. The way kernels and modules are loaded has always been to load them before the menu. You should see this as you are booting. The unload command lets you discard these things and change your game plan. A few other commands that are good to know on the loader prompt: ls or ls path Good for exploring for things to load (the next command): load path Can load a kernel or load a module. boot or boot path Can boot the loaded kernel (just boot by itself) or boot a kernel at path. more path Can read a file (for example more /boot/loader.conf). See loader(8) for more details. (HINT: according to loader(8) there's also an lsmod command) In this configuration the system booted correctly and I mounted the slave and corrected loader.conf. Recabled the original disk as master and was back in business. Good. Rescue discs are good for this too. My own FreeBSD Druid for example. I think that because the ipfw modules were loaded before the boot process got to the boot menu is what caused the boot menu to not function correctly. Don't see a PR in this case. Correct -- No PR needed; the boot menu functions properly (however it can't affect boot if you _can't_ in-fact boot). Thanks to all who replied. Cheers. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you
enter single user mode from boot menu
running 9.1 and can not figure how to get into single user mode or safe mode from the BOOT menu. After hitting the 5 or 6 keys to select those options, what do you do next to continue? Hitting enter key just boots the system without regard to options selected. Can not find usage of boot menu in the handbook. Help please ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On Sun, 28 Apr 2013 18:44:46 -0400, Joe wrote: running 9.1 and can not figure how to get into single user mode or safe mode from the BOOT menu. After hitting the 5 or 6 keys to select those options, what do you do next to continue? Hitting enter key just boots the system without regard to options selected. TO be honest, I don't use the boot menu. Instead I tend to access SUM (single user mode) when neccessary by the respective loader command. To illustrate this approach: The /boot/loader.conf file contains those two line: autoboot_delay=1 beastie_disable=YES The delay time (in seconds) is the time you have to choose when _not_ going into multi-user mode (default), so increase this value if needed. After the BTX loader has started, keep hammering the space bar. :-) At some point, you'll see the Ok _ prompt. This is where you enter the command boot -s to go into single-user mode. The kernel will load as you would expect, but no further action (rc.d startup) will be taken. Instead you have to confirm the shell (/bin/sh by default) by pressing enter at the When prompted Enter full pathname of shell or RETURN for /bin/sh: prompt; and then you're left at the # _ prompt, which means you're in single user mode. Type exit to start into multi-user mode as usual. Of couse, this is what _should_ happen if you select the proper item from the loader menu (key '4'), but as I don't use this, I can't be more specific. It's just a natural assumption. :-) Can not find usage of boot menu in the handbook. The FreeBSD Handbook only briefly visits this topic: 13.6.2: Single-User Mode http://www.freebsd.org/doc/en/books/handbook/boot-init.html 25.7.6: Drop to Single User Mode http://www.freebsd.org/doc/handbook/makeworld.html Fortunately, good documentation can be found in the manual pages. I recommend man 8 boot and man 8 loader, which are involved in getting into SUM (loader more than boot regarding your question). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On Sun, Apr 28, 2013 at 4:04 PM, Polytropon free...@edvax.de wrote: After the BTX loader has started, keep hammering the space bar. :-) At some point, you'll see the Ok _ prompt. This is where you enter the command boot -s to go into single-user mode. The kernel will load as you would expect, but no further action (rc.d startup) will be taken. Instead you have to confirm the shell (/bin/sh by default) by pressing enter at the When prompted Enter full pathname of shell or RETURN for /bin/sh: prompt; and then you're left at the # _ prompt, which means you're in single user mode. Type exit to start into multi-user mode as usual. In single user mode, the root filesystem will be the only one mounted, and it will be mounted read-only. If you need to make changes (Correcting a fat-fingered edit to /etc/fstab, for example), you'll need to mount root rw. mount -u -o rw / is the minimal command to do that. You might also find it easier to mount /tmp and /var if they're separate filesystems... YMMV, etc. - M ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On Apr 28, 2013, at 4:13 PM, Michael Sierchio wrote: On Sun, Apr 28, 2013 at 4:04 PM, Polytropon free...@edvax.de wrote: After the BTX loader has started, keep hammering the space bar. :-) At some point, you'll see the Ok _ prompt. This is where you enter the command boot -s to go into single-user mode. The kernel will load as you would expect, but no further action (rc.d startup) will be taken. Instead you have to confirm the shell (/bin/sh by default) by pressing enter at the When prompted Enter full pathname of shell or RETURN for /bin/sh: prompt; and then you're left at the # _ prompt, which means you're in single user mode. Type exit to start into multi-user mode as usual. In single user mode, the root filesystem will be the only one mounted, and it will be mounted read-only. If you need to make changes (Correcting a fat-fingered edit to /etc/fstab, for example), you'll need to mount root rw. mount -u -o rw / or mount -u -rw / (just thought I'd save you 2 keystrokes, nyuk nyuk) -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On Apr 28, 2013, at 3:44 PM, Joe wrote: running 9.1 and can not figure how to get into single user mode or safe mode from the BOOT menu. After hitting the 5 or 6 keys to select those options, what do you do next to continue? Based on your description it sounds like you have the following boot menu (regardless of color): http://twitpic.com/b1pkz1 Pressing 5 or 6 changes the status from off to On Hitting enter key just boots the system without regard to options selected. Pressing ENTER is supposed to boot with the displayed options. If this is not your experience, then a potential bug has been found. Can not find usage of boot menu in the handbook. The 4th files are heavily documented in man-pages as well as by loader and boot manuals. -- Devin P.S. There have been enhancements already that will come down with 9.2 that add a top-level Boot single user mode option simply by pressing s -- thus making it like the boot menus of 6.x, 7.x, and 8.x (s to boot single user). _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On 4/28/2013 7:50 PM, Teske, Devin wrote: On Apr 28, 2013, at 4:13 PM, Michael Sierchio wrote: On Sun, Apr 28, 2013 at 4:04 PM, Polytropon free...@edvax.de wrote: mount -u -o rw / or mount -u -rw / (just thought I'd save you 2 keystrokes, nyuk nyuk) Or mount -ua ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
Joshua Isom writes: mount -u -o rw / or mount -u -rw / (just thought I'd save you 2 keystrokes, nyuk nyuk) Or mount -ua Understand this mounts all filesystems not marked noauto in fstab ... whether that's the right thing or not. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: enter single user mode from boot menu
On Mon, 29 Apr 2013, Teske, Devin wrote: In single user mode, the root filesystem will be the only one mounted, and it will be mounted read-only. If you need to make changes (Correcting a fat-fingered edit to /etc/fstab, for example), you'll need to mount root rw. mount -u -o rw / or mount -u -rw / (just thought I'd save you 2 keystrokes, nyuk nyuk) Ooh, a contest. All I ever use is mount -u / ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question about freebsd-update: single user mode is not needed anymore?
Well, I understand your concern. I've been using the freebsd-update method since several years now and mostly remotely. I've never encounter a problem. I haven't recompiled everything many times as I didn't really found a tangible advantage in this method but I've never thought about this. I believe some developer around here can provide you a neat explanation about that (which is going to be interesting to know). Strictly about your concern I believe whatever way you use for your upgrade you CANNOT be 100% sure that your upgrade will go smoothly and things like loosing control of your remote box will not happen. Even though jumping from close releases 9.0 = 9.1 is a low risk upgrade, a console access to your remote server (via terminal server/KVM/other) is imperative in these cases to avoid the worst. On Mon, 2012-12-31 at 16:50 +0100, Jose Garcia Juanino wrote: El lunes 31 de diciembre a las 16:27:44 CET, ASV escribió: Hi Jose, with the freebsd-update method you don't need to pass through the make installworld as it's a binary patch/upgrade system. Using freebsd-update upgrade -r 9.1-RELEASE for example allows you to get your system patched directly without recompiling the kernel and the userland but getting binary patches from the repo and applying these directly on your system. Check the following page for a more detailed explanation and be aware that upgrading your ports/packages is required every time you upgrade your kernel to a major version (which would be your case). http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html Happy new year. Thanks for your response. The freebsd-update upgrade method is: 1- freebsd-update install # will install a new kernel and modules 2- reboot in multi user 3- freebsd-update install # will install new userland 4- reboot in multi user The src upgrade method is: 1- make installkernel # will install a new kernel 2- reboot in single user 3- make installworld # will install a new userland 4- reboot in multiuser I think that the third step is essentially the same in both methods: it will install a new userland. But the second one require to be ran in single user, and the first one does not. Why? My unique concern is that step 2 in freebsd-update method goes smootly: it will boot kernel in 9.1-RELEASE but userland in 9.0-RELEASE. If the system hangs giving up the net or other essential service, I will not be able to reach the computer via ssh. Regards ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question about freebsd-update: single user mode is not needed anymore?
For some reason my email hasn't apparently been delivered so I'm re-sending it. From: ASV a...@inhio.eu To: Jose Garcia Juanino jjuan...@gmail.com Cc: freebsd-questions@freebsd.org Subject:Re: Newbie question about freebsd-update: single user mode is not needed anymore? Date: Mon, 31 Dec 2012 17:19:19 +0100| Well, I understand your concern. I've been using the freebsd-update method since several years now and mostly remotely. I've never encounter a problem. I haven't recompiled everything many times as I didn't really found a tangible advantage in this method but I've never thought about this. I believe some developer around here can provide you a neat explanation about that (which is going to be interesting to know). Strictly about your concern I believe whatever way you use for your upgrade you CANNOT be 100% sure that your upgrade will go smoothly and things like loosing control of your remote box will not happen. Even though jumping from close releases 9.0 = 9.1 is a low risk upgrade, a console access to your remote server (via terminal server/KVM/other) is imperative in these cases to avoid the worst. On Mon, 2012-12-31 at 16:50 +0100, Jose Garcia Juanino wrote: El lunes 31 de diciembre a las 16:27:44 CET, ASV escribió: Hi Jose, with the freebsd-update method you don't need to pass through the make installworld as it's a binary patch/upgrade system. Using freebsd-update upgrade -r 9.1-RELEASE for example allows you to get your system patched directly without recompiling the kernel and the userland but getting binary patches from the repo and applying these directly on your system. Check the following page for a more detailed explanation and be aware that upgrading your ports/packages is required every time you upgrade your kernel to a major version (which would be your case). http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html Happy new year. Thanks for your response. The freebsd-update upgrade method is: 1- freebsd-update install # will install a new kernel and modules 2- reboot in multi user 3- freebsd-update install # will install new userland 4- reboot in multi user The src upgrade method is: 1- make installkernel # will install a new kernel 2- reboot in single user 3- make installworld # will install a new userland 4- reboot in multiuser I think that the third step is essentially the same in both methods: it will install a new userland. But the second one require to be ran in single user, and the first one does not. Why? My unique concern is that step 2 in freebsd-update method goes smootly: it will boot kernel in 9.1-RELEASE but userland in 9.0-RELEASE. If the system hangs giving up the net or other essential service, I will not be able to reach the computer via ssh. Regards ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question about freebsd-update: single user mode is not needed anymore?
Hi Jose, with the freebsd-update method you don't need to pass through the make installworld as it's a binary patch/upgrade system. Using freebsd-update upgrade -r 9.1-RELEASE for example allows you to get your system patched directly without recompiling the kernel and the userland but getting binary patches from the repo and applying these directly on your system. Check the following page for a more detailed explanation and be aware that upgrading your ports/packages is required every time you upgrade your kernel to a major version (which would be your case). http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html Happy new year. On Mon, 2012-12-31 at 13:13 +0100, Jose Garcia Juanino wrote: Hi, I am planning to upgrade from FreeBSD 9.0-RELEASE to FreeBSD-9.1-RELEASE. With upgrade source method, it is always needed to do the make installworld step in single user mode. But it seems to be that single user is not required with freebsd-update method, in the second freebsd-update install. Someone could explain the reason? Am I misunderstanding something? Can I run the upgrade enterely by mean a ssh connection in a safe way, or will I need a serial console? Best regards, and excuse my poor english. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Newbie question about freebsd-update: single user mode is not needed anymore?
Hi, I am planning to upgrade from FreeBSD 9.0-RELEASE to FreeBSD-9.1-RELEASE. With upgrade source method, it is always needed to do the make installworld step in single user mode. But it seems to be that single user is not required with freebsd-update method, in the second freebsd-update install. Someone could explain the reason? Am I misunderstanding something? Can I run the upgrade enterely by mean a ssh connection in a safe way, or will I need a serial console? Best regards, and excuse my poor english. pgpswn9DndVD_.pgp Description: PGP signature
Re: Newbie question about freebsd-update: single user mode is not needed anymore?
El lunes 31 de diciembre a las 16:27:44 CET, ASV escribió: Hi Jose, with the freebsd-update method you don't need to pass through the make installworld as it's a binary patch/upgrade system. Using freebsd-update upgrade -r 9.1-RELEASE for example allows you to get your system patched directly without recompiling the kernel and the userland but getting binary patches from the repo and applying these directly on your system. Check the following page for a more detailed explanation and be aware that upgrading your ports/packages is required every time you upgrade your kernel to a major version (which would be your case). http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html Happy new year. Thanks for your response. The freebsd-update upgrade method is: 1- freebsd-update install # will install a new kernel and modules 2- reboot in multi user 3- freebsd-update install # will install new userland 4- reboot in multi user The src upgrade method is: 1- make installkernel # will install a new kernel 2- reboot in single user 3- make installworld # will install a new userland 4- reboot in multiuser I think that the third step is essentially the same in both methods: it will install a new userland. But the second one require to be ran in single user, and the first one does not. Why? My unique concern is that step 2 in freebsd-update method goes smootly: it will boot kernel in 9.1-RELEASE but userland in 9.0-RELEASE. If the system hangs giving up the net or other essential service, I will not be able to reach the computer via ssh. Regards pgpbaloy3DIlu.pgp Description: PGP signature
Re: Single user mode exits unexpectedly
On Sat, 31 Dec 2011 09:39:41 +0100 Polytropon free...@edvax.de wrote: On Sat, 31 Dec 2011 00:57:04 -0500, Janos Dohanics wrote: I have just rebuilt world and kernel according to the Handbook, installed the new kernel, rebooted, logged in, issued sudo shutdown now - the machine entered single user mode, then immediately exited without any intervention by me and continued to boot into multiuser mode. That's not the procedure required. From the comment section of /usr/src/Makefile: 1. `cd /usr/src' (or to the directory containing your source tree). 2. `make buildworld' 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). [steps 3. 4. can be combined by using the kernel target] 5. `reboot'(in single user mode: boot -s from the loader prompt). 6. `mergemaster -p' 7. `make installworld' 8. `make delete-old' 9. `mergemaster'(you may wish to use -i, along with -U or -F). 10. `reboot' 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) Step 5: reboot _into_ single user mode. After installing the kernel and shutting down the system, let it come up to the kernel loader. You can enter that stage by pressing the space bar several times. If I remember correctly, you'll then see prompt Well, rebuilt World, kernel, installed kernel, rebooted into single user mode, installed world, but still have the same problem. When going from multi user mode to single user mode: the computer immediately exits single user mode and boots into multi user mode. When starting the system and booting into single user mode, this does not happen. I'd appreciate your suggestions... -- Janos Dohanics ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Single user mode exits unexpectedly
On Sat, 31 Dec 2011 00:57:04 -0500, Janos Dohanics wrote: I have just rebuilt world and kernel according to the Handbook, installed the new kernel, rebooted, logged in, issued sudo shutdown now - the machine entered single user mode, then immediately exited without any intervention by me and continued to boot into multiuser mode. That's not the procedure required. From the comment section of /usr/src/Makefile: 1. `cd /usr/src' (or to the directory containing your source tree). 2. `make buildworld' 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). [steps 3. 4. can be combined by using the kernel target] 5. `reboot'(in single user mode: boot -s from the loader prompt). 6. `mergemaster -p' 7. `make installworld' 8. `make delete-old' 9. `mergemaster'(you may wish to use -i, along with -U or -F). 10. `reboot' 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) Step 5: reboot _into_ single user mode. After installing the kernel and shutting down the system, let it come up to the kernel loader. You can enter that stage by pressing the space bar several times. If I remember correctly, you'll then see prompt Ok _ Then enter boot -s to bring up the system in single user mode. After you've confirmed the shell, do # mount -a # cd /usr/src # mergemaster -p and continue with steps 7 - 10. If you have the Beastie menu, press [4] to get into the single user mode. Here is a snippet from /var/log/messages: Dec 30 17:41:15 iguana rc.shutdown: 30 second watchdog timeout expired. Shutdown terminated. Dec 30 17:41:15 iguana init: /bin/sh on /etc/rc.shutdown terminated abnormally, going to single user mode Dec 30 17:41:15 iguana syslogd: exiting on signal 15--- Dec 30 17:41:28 iguana syslogd: kernel boot file is /boot/kernel/kernel --- This seems to be happening every time in response to shutdown now. The reason might be that you're running your updated kernel, but the world has not been properly installed? However, I can cold boot this machine into single user mode with nothing unusual. This is FreeBSD 8.2-STABLE amd64, rebuilt on 12/26/2011 I guess I may have unintentionally changed a config file? Where should I look? Review your installation steps and _maybe_ redo the installation as indicated in the manual. Maybe there's really just something out of sync. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Single user mode exits unexpectedly
On Sat, 31 Dec 2011 09:39:41 +0100 Polytropon free...@edvax.de wrote: On Sat, 31 Dec 2011 00:57:04 -0500, Janos Dohanics wrote: I have just rebuilt world and kernel according to the Handbook, installed the new kernel, rebooted, logged in, issued sudo shutdown now - the machine entered single user mode, then immediately exited without any intervention by me and continued to boot into multiuser mode. That's not the procedure required. From the comment section of /usr/src/Makefile: 1. `cd /usr/src' (or to the directory containing your source tree). 2. `make buildworld' 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). [steps 3. 4. can be combined by using the kernel target] 5. `reboot'(in single user mode: boot -s from the loader prompt). 6. `mergemaster -p' 7. `make installworld' 8. `make delete-old' 9. `mergemaster'(you may wish to use -i, along with -U or -F). 10. `reboot' 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) Step 5: reboot _into_ single user mode. After installing the kernel and shutting down the system, let it come up to the kernel loader. You can enter that stage by pressing the space bar several times. If I remember correctly, you'll then see prompt You are right, the Handbook says Reboot into single user mode, and I should have just followed it. Nonetheless, I used to reboot normally, and then drop in single user mode - can't remember ever seeing this problem. Thank you, I'll try it next time I'm at that machine... -- Janos Dohanics ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Single user mode exits unexpectedly
I have just rebuilt world and kernel according to the Handbook, installed the new kernel, rebooted, logged in, issued sudo shutdown now - the machine entered single user mode, then immediately exited without any intervention by me and continued to boot into multiuser mode. Here is a snippet from /var/log/messages: Dec 30 17:41:15 iguana rc.shutdown: 30 second watchdog timeout expired. Shutdown terminated. Dec 30 17:41:15 iguana init: /bin/sh on /etc/rc.shutdown terminated abnormally, going to single user mode Dec 30 17:41:15 iguana syslogd: exiting on signal 15--- Dec 30 17:41:28 iguana syslogd: kernel boot file is /boot/kernel/kernel --- This seems to be happening every time in response to shutdown now. However, I can cold boot this machine into single user mode with nothing unusual. This is FreeBSD 8.2-STABLE amd64, rebuilt on 12/26/2011 I guess I may have unintentionally changed a config file? Where should I look? -- Janos Dohanics ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: No usb keyboard in single user mode
On 11/11/2011 12:02, Polytropon wrote: On Fri, 11 Nov 2011 10:41:56 +0100, David Demelier wrote: When prompted Enter full pathname of shell or RETURN for /bin/sh:uhub3: 6 ports with 6 removable, self powered uhub7: 8 ports with 8 removable, self powered ugen0.2:BTC at usbus0 ukbd0:BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.20, addr 2 on usbus0 kbd1 at ukbd0 uhid0:BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.20, addr 2 on usbus0 ugen1.2:vendor 0x0a12 at usbus1 ubt0:vendor 0x0a12 EDRClassone, class 224/1, rev 2.00/19.58, addr 2 on usbus1 ugen0.3:Logitech at usbus0 So here nothing possible to do, only shutdown by power button. After the keyboard has been detected, you should be able to enter full pathname of shell or RETURN for /bin/sh. Possible obstacle if you do NOT have device kbdmux in your kernel configuration! I have heard a long time ago that legacy USB must be enabled in the BIOS and it is in mine. I also had a similar experience in v7 with my old system. After waiting for the kernel to identify ukbd0, it could be used as intended for local logins. I remember why I added kbdmux as module. If not this option will not be honored: makeoptions UKBD_DFLT_KEYMAP=uk.iso And then I don't have my uk.iso keymap on single user mode ! -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
No usb keyboard in single user mode
Hello, This question may have been asked a lot of time but I have the same problem, my USB keyboard works well with the loader, when the system has successfully booted but not in the single user mode. I don't know if this matters but when the request When prompted Enter full pathname of shell or RETURN for /bin/sh: comes, my keyboard didn't already show up in the kernel message, and the kernel still probe and attach devices after this message so the following output is printed : When prompted Enter full pathname of shell or RETURN for /bin/sh:uhub3: 6 ports with 6 removable, self powered uhub7: 8 ports with 8 removable, self powered ugen0.2: BTC at usbus0 ukbd0: BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.20, addr 2 on usbus0 kbd1 at ukbd0 uhid0: BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.20, addr 2 on usbus0 ugen1.2: vendor 0x0a12 at usbus1 ubt0: vendor 0x0a12 EDRClassone, class 224/1, rev 2.00/19.58, addr 2 on usbus1 ugen0.3: Logitech at usbus0 So here nothing possible to do, only shutdown by power button. I have heard a long time ago that legacy USB must be enabled in the BIOS and it is in mine. This is reproducible all the time on 8.2-RELEASE Cheers, -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
David Demelier demelier.da...@gmail.com writes: On 21/03/2011 10:51, Pan Tsu wrote: David Demelierdemelier.da...@gmail.com writes: The problem when you're using directly kbdmux in the kernel config, the ATKBD_DFLT_KEYMAP and UKBD_DFLT_KEYMAP are ineffective, you can't set these both together ... For me I added these both to use uk.iso but in single user mode I still have the standard us layout. Can you try the patch in kern/153459 ? It adds KBDMUX_DFLT_KEYMAP which allows using non-default layout in single user mode or ddb. By the way why is kbdmux needed for an usb keyboard? Should not be managed by ukbd only? ukbd should work without kbdmux if you compile out atkbd. At least, it worked for me but not in ddb or newcons. I don't understand .. But thanks for the patch. Note, patches in GNATS can be for years not even looked at. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On 20/03/2011 12:13, Polytropon wrote: On Sun, 20 Mar 2011 09:55:35 +0100, David Demelierdemelier.da...@gmail.com wrote: Hello, I just realized that I can't use my USB keyboard if I start FreeBSD in single user mode. The keyboard is still detected but I can't use it. It works with the loader of course. I don't know if it's related to devd and if it's running. I also have USB legacy enabled in the BIOS settings. Do you have kbdmux in your kernel? If you don't have it, switching to the other keyboard is needed to be issued from the AT keyboard (if present), using the kbdcontrol program. Kernel configuration should contain: options KBD_INSTALL_CDEV# install a CDEV entry in /dev # atkbdc0 controls both the keyboard and the PS/2 mouse device kbdmux # keyboard multiplexer device atkbdc # AT keyboard controller device atkbd # AT keyboard options ATKBD_DFLT_KEYMAP makeoptions ATKBD_DFLT_KEYMAP=german.iso # USB support stuff here... device ukbd# Keyboard options UKBD_DFLT_KEYMAP makeoptions UKBD_DFLT_KEYMAP=german.iso If I remember correctly, most of the important lines are part of the GENERIC kernel configuration. On my system, I can't use the USB keyboard in CMOS setup or at the loader, but it works as soon as the kernel has finished loading, so when the boot process has enabled the single user mode, the USB keyboard is usable. For loader-related things, I still have to keep a PS/2 AT keyboard handy. The problem when you're using directly kbdmux in the kernel config, the ATKBD_DFLT_KEYMAP and UKBD_DFLT_KEYMAP are ineffective, you can't set these both together ... For me I added these both to use uk.iso but in single user mode I still have the standard us layout. Cheers, -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
David Demelier demelier.da...@gmail.com writes: The problem when you're using directly kbdmux in the kernel config, the ATKBD_DFLT_KEYMAP and UKBD_DFLT_KEYMAP are ineffective, you can't set these both together ... For me I added these both to use uk.iso but in single user mode I still have the standard us layout. Can you try the patch in kern/153459 ? It adds KBDMUX_DFLT_KEYMAP which allows using non-default layout in single user mode or ddb. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On Mon, 21 Mar 2011 08:01:27 +0100, David Demelier demelier.da...@gmail.com wrote: The problem when you're using directly kbdmux in the kernel config, the ATKBD_DFLT_KEYMAP and UKBD_DFLT_KEYMAP are ineffective, you can't set these both together ... Thanks for the pointer. Really! I know that it worked in the past (as you've noticed, I did define german keyboard settings), and it stopped working with FreeBSD 7. Of course I didn't use kbdmux prior to that. Good to know about that. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On 21/03/2011 10:51, Pan Tsu wrote: David Demelierdemelier.da...@gmail.com writes: The problem when you're using directly kbdmux in the kernel config, the ATKBD_DFLT_KEYMAP and UKBD_DFLT_KEYMAP are ineffective, you can't set these both together ... For me I added these both to use uk.iso but in single user mode I still have the standard us layout. Can you try the patch in kern/153459 ? It adds KBDMUX_DFLT_KEYMAP which allows using non-default layout in single user mode or ddb. By the way why is kbdmux needed for an usb keyboard? Should not be managed by ukbd only? I don't understand .. But thanks for the patch. Cheers, -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On Mon, 21 Mar 2011 11:45:06 +0100, David Demelier demelier.da...@gmail.com wrote: By the way why is kbdmux needed for an usb keyboard? Should not be managed by ukbd only? I don't understand .. But thanks for the patch. Basically, the kbdmux option wires keyboards in parallel, so you can use both keyboards (assume they are physically present) at the same time, like one keyboard for each hand. If this option was not present, you would have to use kbdcontrol -k to switch from one keyboard (the currently active one) to the other (not usable). Problems may occur if your mainboard does provide an AT style keyboard (usually with PS/2 connector) as atkbdc0 and adkbd0 (controller and keyboard) even if there is no physical keyboard attached. This would then usually become the primary keyboard. A USB keyboard, detected later on as ukbd0, would not automatically be activated (or switched over to by a kbdcontrol -k command issued by devd) and can therefore not be used, even if physically present (in opposite to the phantom keyboard atkbd0). The kbdmux option makes _all_ keyboards available for input (without using kbdcontrol -k and without dependency of devd) so the USB keyboard will be used, the AT phantom keyboard will be ignored (which is good when it's not even present). So basically, kbdmux means use all of them, while its absence means use this or that. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On 21/03/2011 12:11, Polytropon wrote: On Mon, 21 Mar 2011 11:45:06 +0100, David Demelierdemelier.da...@gmail.com wrote: By the way why is kbdmux needed for an usb keyboard? Should not be managed by ukbd only? I don't understand .. But thanks for the patch. Basically, the kbdmux option wires keyboards in parallel, so you can use both keyboards (assume they are physically present) at the same time, like one keyboard for each hand. If this option was not present, you would have to use kbdcontrol -k to switch from one keyboard (the currently active one) to the other (not usable). Problems may occur if your mainboard does provide an AT style keyboard (usually with PS/2 connector) as atkbdc0 and adkbd0 (controller and keyboard) even if there is no physical keyboard attached. This would then usually become the primary keyboard. A USB keyboard, detected later on as ukbd0, would not automatically be activated (or switched over to by a kbdcontrol -k command issued by devd) and can therefore not be used, even if physically present (in opposite to the phantom keyboard atkbd0). The kbdmux option makes _all_ keyboards available for input (without using kbdcontrol -k and without dependency of devd) so the USB keyboard will be used, the AT phantom keyboard will be ignored (which is good when it's not even present). So basically, kbdmux means use all of them, while its absence means use this or that. Thanks for this information :-) I understood. I hope the patch proposed will be MFC to -STABLE then. Kind regards, -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
devd started with single-user mode?
Hello, I just realized that I can't use my USB keyboard if I start FreeBSD in single user mode. The keyboard is still detected but I can't use it. It works with the loader of course. I don't know if it's related to devd and if it's running. I also have USB legacy enabled in the BIOS settings. Cheers, -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On Sun, 20 Mar 2011 09:55:35 +0100, David Demelier demelier.da...@gmail.com wrote: Hello, I just realized that I can't use my USB keyboard if I start FreeBSD in single user mode. The keyboard is still detected but I can't use it. It works with the loader of course. I don't know if it's related to devd and if it's running. I also have USB legacy enabled in the BIOS settings. Do you have kbdmux in your kernel? If you don't have it, switching to the other keyboard is needed to be issued from the AT keyboard (if present), using the kbdcontrol program. Kernel configuration should contain: options KBD_INSTALL_CDEV# install a CDEV entry in /dev # atkbdc0 controls both the keyboard and the PS/2 mouse device kbdmux # keyboard multiplexer device atkbdc # AT keyboard controller device atkbd # AT keyboard options ATKBD_DFLT_KEYMAP makeoptions ATKBD_DFLT_KEYMAP=german.iso # USB support stuff here... device ukbd# Keyboard options UKBD_DFLT_KEYMAP makeoptions UKBD_DFLT_KEYMAP=german.iso If I remember correctly, most of the important lines are part of the GENERIC kernel configuration. On my system, I can't use the USB keyboard in CMOS setup or at the loader, but it works as soon as the kernel has finished loading, so when the boot process has enabled the single user mode, the USB keyboard is usable. For loader-related things, I still have to keep a PS/2 AT keyboard handy. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: devd started with single-user mode?
On 20/03/2011 12:13, Polytropon wrote: On Sun, 20 Mar 2011 09:55:35 +0100, David Demelierdemelier.da...@gmail.com wrote: Hello, I just realized that I can't use my USB keyboard if I start FreeBSD in single user mode. The keyboard is still detected but I can't use it. It works with the loader of course. I don't know if it's related to devd and if it's running. I also have USB legacy enabled in the BIOS settings. Do you have kbdmux in your kernel? If you don't have it, switching to the other keyboard is needed to be issued from the AT keyboard (if present), using the kbdcontrol program. Kernel configuration should contain: options KBD_INSTALL_CDEV# install a CDEV entry in /dev # atkbdc0 controls both the keyboard and the PS/2 mouse device kbdmux # keyboard multiplexer device atkbdc # AT keyboard controller device atkbd # AT keyboard options ATKBD_DFLT_KEYMAP makeoptions ATKBD_DFLT_KEYMAP=german.iso # USB support stuff here... device ukbd# Keyboard options UKBD_DFLT_KEYMAP makeoptions UKBD_DFLT_KEYMAP=german.iso If I remember correctly, most of the important lines are part of the GENERIC kernel configuration. On my system, I can't use the USB keyboard in CMOS setup or at the loader, but it works as soon as the kernel has finished loading, so when the boot process has enabled the single user mode, the USB keyboard is usable. For loader-related things, I still have to keep a PS/2 AT keyboard handy. Oh yes I have kbdmux but as module only since the /etc/rc.d/bthidd wanted to load it itself. I added as device instead of modules. Thanks! -- David Demelier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
devd started with single-user mode?
David Demelier writes: I just realized that I can't use my USB keyboard if I start FreeBSD in single user mode. The keyboard is still detected but I can't use it. My memory says I had this problem several years ago. Back in 5.*, or maybe 6.*? It could fixed in the short term by a rebooting the machine. The long term fix was changes in the code. Since then, works for me. May we have more information avout your hardware and FreeBSD version, please? Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pass for single user mode
On 11 December 2010 16:55, K. Yura yy.gu...@gmail.com wrote: 2010/12/11 Chris Rees utis...@gmail.com Have a look at /etc/ttys. Chris Thank you very much No problem. Don't forget that although you've now made it non-trivial to break into your computer with console access, it's still easy for a physical attacker to: - remove your hard drive - boot from a USB key or CD or floppy etc - mess with your BIOS settings. This is why by default there's no root password for single user; if an attacker has physical access you're screwed anyway! Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
pass for single user mode
FreeBSD .dlink 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Hi. Where can I set up password for single user mode? Thanx. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pass for single user mode
Have a look at /etc/ttys. Chris Sorry for top-posting, Android won't let me quote, but K-9 can't yet do threading. On 11 Dec 2010 16:34, K. Yura yy.gu...@gmail.com wrote: FreeBSD .dlink 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Hi. Where can I set up password for single user mode? Thanx. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pass for single user mode
Hi, To set password for single usermode in FreeBSD: * 1.Edit /etc/ttys* vi /etc/ttys * 2.Change the following line *: *From* consolenoneunknown off secure *To* consolenoneunknown off insecure *3.Save and quit editor(vi)* Reboot the box and boot into single user mode, if you wanna test it. By the way, the keyword insecure imply to the console is insecure and thus required root password to be authenticated before single user mode can be access. It DOES NOT mean that the console is run insecurely. Take note. On Sat, Dec 11, 2010 at 11:02 PM, K. Yura yy.gu...@gmail.com wrote: FreeBSD .dlink 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Hi. Where can I set up password for single user mode? Thanx. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Best regards, Mr.Hien E-mail: phanquoch...@gmail.com Website: www.mrhien.info ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Single user mode: no shell prompt
Hello Illoai Am 27.10.2010 18:14, schrieb ill...@gmail.com: On 20 October 2010 03:50, Martin Schweizerlists_free...@bluewin.ch wrote: Hello If I start the server in single user mode I get never a prompt/shell (at the console). After successfully boot in single user mode I see a the last line: Trying to mount root from ufs:/dev/mfid0s1a. The only thing I can do is CTRL-ALT-DEL, then the system reboots as usual (with no broken file system). All works well in multi user mode. I have no other problems with this server. On at least one of my machines the USB devices do not finish probing until after the Enter the name of your shell or press enter for /bin/sh prompt, and thus it scrolls off of the screen. Pressing enter does give me a /bin/sh in single-user mode, however. Yeah, I now what you mean but in the mean team I found the solution. The problem was the console redirection. Why ever... Regards, -- Martin Schweizer PC-Service M. Schweizer GmbH; Bannholzstrasse 6; Postfach 132; CH-8608 Bubikon; Tel. +41 55 243 30 00; Fax: +41 55 243 33 22 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Single user mode: no shell prompt
Hello If I start the server in single user mode I get never a prompt/shell (at the console). After successfully boot in single user mode I see a the last line: Trying to mount root from ufs:/dev/mfid0s1a. The only thing I can do is CTRL-ALT-DEL, then the system reboots as usual (with no broken file system). All works well in multi user mode. I have no other problems with this server. Attached you find the /var/run/dmesg.boot. Any ideas are welcome. Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.1-RELEASE #1: Sun Oct 17 12:46:44 CEST 2010 mar...@firewall.acutronic.ch:/usr/obj/usr/src/sys/GENERIC amd64 Timecounter i8254 frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(R) CPU E5310 @ 1.60GHz (1605.51-MHz K8-class CPU) Origin = GenuineIntel Id = 0x6f7 Family = 6 Model = f Stepping = 7 Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE Features2=0x4e33dSSE3,DTES64,MON,DS_CPL,VMX,TM2,SSSE3,CX16,xTPR,PDCM,DCA AMD Features=0x20100800SYSCALL,NX,LM AMD Features2=0x1LAHF TSC: P-state invariant real memory = 4294967296 (4096 MB) avail memory = 4077580288 (3888 MB) ACPI APIC Table: INTEL S5000PAL FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 2 package(s) x 4 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 ioapic0 Version 2.0 irqs 0-23 on motherboard ioapic1 Version 2.0 irqs 24-47 on motherboard lapic0: Forcing LINT1 to edge trigger kbd1 at kbdmux0 acpi0: INTEL S5000PAL on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) Timecounter ACPI-fast frequency 3579545 Hz quality 1000 acpi_timer0: 24-bit timer at 3.579545MHz port 0x408-0x40b on acpi0 cpu0: ACPI CPU on acpi0 cpu1: ACPI CPU on acpi0 cpu2: ACPI CPU on acpi0 cpu3: ACPI CPU on acpi0 cpu4: ACPI CPU on acpi0 cpu5: ACPI CPU on acpi0 cpu6: ACPI CPU on acpi0 cpu7: ACPI CPU on acpi0 acpi_hpet0: High Precision Event Timer iomem 0xfed0-0xfed003ff on acpi0 Timecounter HPET frequency 14318180 Hz quality 900 ipmi0: IPMI System Interface port 0xca2,0xca3 on acpi0 ipmi0: KCS mode found at io 0xca2 on acpi acpi_button0: Power Button on acpi0 pcib0: ACPI Host-PCI bridge port 0xca2,0xca3,0xcf8-0xcff on acpi0 pci0: ACPI PCI bus on pcib0 pcib1: ACPI PCI-PCI bridge at device 2.0 on pci0 pci1: ACPI PCI bus on pcib1 pcib2: ACPI PCI-PCI bridge irq 16 at device 0.0 on pci1 pci2: ACPI PCI bus on pcib2 pcib3: ACPI PCI-PCI bridge irq 16 at device 0.0 on pci2 pci3: ACPI PCI bus on pcib3 pcib4: ACPI PCI-PCI bridge irq 16 at device 1.0 on pci2 pci4: ACPI PCI bus on pcib4 pcib5: ACPI PCI-PCI bridge irq 16 at device 2.0 on pci2 pci5: ACPI PCI bus on pcib5 em0: Intel(R) PRO/1000 Network Connection 7.0.5 port 0x3020-0x303f mem 0xb882-0xb883,0xb840-0xb87f irq 18 at device 0.0 on pci5 em0: Using MSI interrupt em0: [FILTER] em0: Ethernet address: 00:04:23:d9:9a:42 em1: Intel(R) PRO/1000 Network Connection 7.0.5 port 0x3000-0x301f mem 0xb880-0xb881,0xb800-0xb83f irq 19 at device 0.1 on pci5 em1: Using MSI interrupt em1: [FILTER] em1: Ethernet address: 00:04:23:d9:9a:43 pcib6: ACPI PCI-PCI bridge at device 0.3 on pci1 pci6: ACPI PCI bus on pcib6 pcib7: PCI-PCI bridge at device 3.0 on pci0 pci7: PCI bus on pcib7 pcib8: ACPI PCI-PCI bridge at device 4.0 on pci0 pci8: ACPI PCI bus on pcib8 pcib9: ACPI PCI-PCI bridge at device 5.0 on pci0 pci9: ACPI PCI bus on pcib9 pcib10: ACPI PCI-PCI bridge at device 6.0 on pci0 pci10: ACPI PCI bus on pcib10 mfi0: LSI MegaSAS 1078 port 0x2000-0x20ff mem 0xb8b0-0xb8b3,0xb8b4-0xb8b7 irq 16 at device 0.0 on pci10 mfi0: Megaraid SAS driver Ver 3.00 mfi0: 45159 (340875603s/0x0020/info) - Shutdown command received from host mfi0: 45160 (boot + 3s/0x0020/info) - Firmware initialization started (PCI ID 0060/1000/100a/8086) mfi0: 45161 (boot + 3s/0x0020/info) - Firmware version 1.12.172-0470 mfi0: 45162 (boot + 4s/0x0008/info) - Battery started charging mfi0: 45163 (boot + 4s/0x0008/info) - Battery temperature is normal mfi0: 45164 (boot + 4s/0x0008/WARN) - Battery requires reconditioning; please initiate a LEARN cycle mfi0: 45165 (boot + 4s/0x0008/info) - Battery Present mfi0: 45166 (boot + 4s/0x0020/info) - Board Revision mfi0: 45167 (boot + 15s/0x0002/info) - Unexpected sense: PD 113(e0x00/s19) Path 500600b0007ffe20 , CDB: 12 01 83 00 60 00, Sense: 70 00 05 00 00 00 00 1d 00 00 00 00 mfi0: 45168 (boot + 15s/0x0004/info) - Enclosure (SES) discovered on PD 0b(c None/p1) mfi0: 45169 (boot + 15s/0x0002/info) - Inserted: Encl PD 0b mfi0: 45170 (boot + 15s/0x0002/info) - Inserted: PD 0b(c None/p1) Info
Re: mountpoint not existent, droping to single user mode
On Sat, 21 Aug 2010 23:12:03 +0200, claudiu vasadi claudiu.vas...@gmail.com wrote: I added the corresponding fstab entries and then I deliberately removed the /mnt/2 folder. Sorry for sounding picky, but FreeBSD does not have folders. Those are called directories. Please try to use the correct terminology. You don't talk about files as sheets of paper either, do you? :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: mountpoint not existent, droping to single user mode
On Sat, 21 Aug 2010 23:12:03 +0200, claudiu vasadi claudiu.vas...@gmail.com wrote: What happened when a secondary hdd cannot be mounted at boot ? From experience I know the OS drops to single user mode, which I find incredibly stupid because a non-OS hdd should not stop the OS from booting up (imagine the hdd has a malfunction and then you get lucky enough to get a power surge - the OS won't come up because of a darn non-OS-important hdd). The OS does not know about how you are intending to use a hard disk. It just knows that /etc/fstab retuires (!) the mounting of a certain partition at boot time. If this fails, the boot process will NOT go on. An example: Let's say you have a mountpoint /foo on the / partition. This partition has 200 MB free space. The mountpoint /foo will usually be used for the /dev/da0 disk. After boot, a program will periodically output data to /foo, and will soon produce several GB of data within short time. Now assume the system comes up, /dev/da0 not present, okay, don't mind. Result: Soon / will be full. Problem. A similar situation happens if a mountpoint that /etc/fstab requires (!) to be present is NOT present. To the OS, this is a problematic situation as it requires operator decision. TEST scenario: 2 hdd's. The system is installed on the first one, and the second one has /mnt/2 as mountpoin. The 2nd disk was labeled and a new ufs partition was created. I added the corresponding fstab entries and then I deliberately removed the /mnt/2 folder. Directory. :-) FYI: this secondary hdd has no data on it whatsoever. The OS does not know that. Then I rebooted and of course the system went in single user mode. And now my question: WHY (I know that rc finishes abnormally) A solution would be to code noauto for this mount in /etc/fstab, and then add a custom mount call in /etc/rc.local which can check both the existance of the device and the mountpoint. You could also just ignore the errors, because (as far as I remember) a failing operation in rc.local won't stop the system to fully come up. The hdd has no relevant data on it, the OS has no files on it ... basically it does not get in the way of anything (except the perfect execution of the rc framework). Then mount manually after boot. Anyway, it seems to me that secondary hdd's mount failure should be ignored and an OS should be able to come up if one mountpoint does not exist or if an entry in fstab is wrong (again, I am talking about non-OS related hdd/mountpoints). I'm not sure how the OS should be able to decide about that, what's an OS mount and what's a non-OS mount. To make things worst, I tested a RHEL5 and the system booted without any problems even if the secondary hdd's mp was missing. I won't elaborate on why Linux behaviour is not a reference point for different operating systems. :-) Can someone explain this weird? behavior ? Intended behaviour - PREDICTABLE and SECURE. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: mountpoint not existent, droping to single user mode
ok, so I will make a secondary mount script that would check and mount any non-OS-related mp's. This would include setting all non-OS mp's to noauto in fstab and creating a secondary script to read fstab, check if all is in order and finally mount, or exit in error. This way, the OS sticks to it's ideology and the secondary mp's do not interfere with that ideology in any way. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: mountpoint not existent, droping to single user mode
On Sun, 22 Aug 2010 11:27:02 +0200, claudiu vasadi claudiu.vas...@gmail.com wrote: ok, so I will make a secondary mount script that would check and mount any non-OS-related mp's. This would include setting all non-OS mp's to noauto in fstab and creating a secondary script to read fstab, check if all is in order and finally mount, or exit in error. This way, the OS sticks to it's ideology and the secondary mp's do not interfere with that ideology in any way. You can use lazy man's /etc/rc.local, or write an rc.d style script, or simply mount it manually when needed. For example, I have a second disk for operated backups, with noauto in /etc/fstab, which I mount manually on the occassions I want to use it, so it's kept unmounted when not needed (good for security, good for my mind). :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: mountpoint not existent, droping to single user mode
I will write a rc.d script. It seems like the correct way to go. Manual mount is out of the question :) I will e-mail my end product ps: I know it's a dir and not a folder ;) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
mountpoint not existent, droping to single user mode
Hello fellas, I have a 8.0 i386 vmware machine for the sake of testing the following behavior: What happened when a secondary hdd cannot be mounted at boot ? From experience I know the OS drops to single user mode, which I find incredibly stupid because a non-OS hdd should not stop the OS from booting up (imagine the hdd has a malfunction and then you get lucky enough to get a power surge - the OS won't come up because of a darn non-OS-important hdd). TEST scenario: 2 hdd's. The system is installed on the first one, and the second one has /mnt/2 as mountpoin. The 2nd disk was labeled and a new ufs partition was created. I added the corresponding fstab entries and then I deliberately removed the /mnt/2 folder. FYI: this secondary hdd has no data on it whatsoever. Then I rebooted and of course the system went in single user mode. And now my question: WHY (I know that rc finishes abnormally) The hdd has no relevant data on it, the OS has no files on it ... basically it does not get in the way of anything (except the perfect execution of the rc framework). Anyway, it seems to me that secondary hdd's mount failure should be ignored and an OS should be able to come up if one mountpoint does not exist or if an entry in fstab is wrong (again, I am talking about non-OS related hdd/mountpoints). To make things worst, I tested a RHEL5 and the system booted without any problems even if the secondary hdd's mp was missing. Can someone explain this weird? behavior ? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
booting single user mode
Looking for conformation. On booting into single user mode all files systems are unmounted except / which is mounted read only. Is this true? Will dump/restore commands work? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: booting single user mode
On Mon, Feb 22, 2010 at 10:39:57AM +0800, Aiza wrote: Looking for conformation. On booting into single user mode all files systems are unmounted except / which is mounted read only. Is this true? Will dump/restore commands work? Generally yes. Make sure they are in your path and available to you in whatever filesystem[s] you have mounted. I think they normally are. I believe dump and restore are in /sbin which should be part of your root filesystem and not in its own partition. ==Never put those things that should be in root in their own partitions== To check where they are use 'which' which dump or which restore will tell you where they are. When you dump a non mounted filesystem, I think you have to use the partition name, not the mount name. So, instead of dump 0afL /dev/nsa0 /usr it might be dump 0afL /dev/nsa0 /dev/ad0s1d if your mount a partition /dev/ad0s1d as /usr normaly. You don't really need to restore to an unmounted partition, though using single user might be useful. If you are restoring in single user, do something like this. fsck -a mount -u / mount -a cd /usr restore -rf /dev/nsa0 Note: I am using /dev/nsa0 as where the dump media is. that would be a tape device. You need to adjust this for where you really write the dump or have the dump stored. jerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: booting single user mode
Jerry McAllister wrote: On Mon, Feb 22, 2010 at 10:39:57AM +0800, Aiza wrote: Looking for conformation. On booting into single user mode all files systems are unmounted except / which is mounted read only. Is this true? Will dump/restore commands work? Generally yes. Make sure they are in your path and available to you in whatever filesystem[s] you have mounted. I think they normally are. I believe dump and restore are in /sbin which should be part of your root filesystem and not in its own partition. ==Never put those things that should be in root in their own partitions== To check where they are use 'which' which dump or which restore will tell you where they are. When you dump a non mounted filesystem, I think you have to use the partition name, not the mount name. So, instead of dump 0afL /dev/nsa0 /usr it might be dump 0afL /dev/nsa0 /dev/ad0s1d if your mount a partition /dev/ad0s1d as /usr normaly. You don't really need to restore to an unmounted partition, though using single user might be useful. If you are restoring in single user, do something like this. fsck -a mount -u / mount -a cd /usr restore -rf /dev/nsa0 Note: I am using /dev/nsa0 as where the dump media is. that would be a tape device. You need to adjust this for where you really write the dump or have the dump stored. jerry Think mistake here dump 0afL /dev/nsa0 /usr Whole reason for doing dump in single user mode is no snapshot so no need for -L flag in your example dump command. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Starting and using services -- Single-user mode -- TECRA_A9-S9017
I have the need to start and use service while in single_user mode. To this point I'm not able to use 'top' or 'ps' respectively. In addition,from the CLI; when I attempt to start services such as 'portmap' and 'sshd' nothing is shown running via 'ps'. All I see are the headers when I issue th 'ps aux' command. I'm sure its possible to do what I'm attempting, but given the crippled situation of this box, I'm stuck in Single-user mode and need to start enough services that will allow the use of 'scp' in order to move some zipped/crucial files from the crippled box to another machine on the same network. There are no other options, I need to do this from single-user mode. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Starting and using services -- Single-user mode -- TECRA_A9-S9017
[EMAIL PROTECTED] wrote: I have the need to start and use service while in single_user mode. To this point I'm not able to use 'top' or 'ps' respectively. In ps is in /bin, top is in /usr/bin ; unless you a) have your PATH wrong or b) commonly put /bin on separate file systems, you should be able to use ps and others in /bin and /sbin. addition,from the CLI; when I attempt to start services such as 'portmap' and 'sshd' nothing is shown running via 'ps'. All I see are the headers when I issue th 'ps aux' command. Are your world and kernel matched? I'm sure its possible to do what I'm attempting, but given the crippled situation of this box, I'm stuck in Single-user mode and need to start enough services that will allow the use of 'scp' in order to move some zipped/crucial files from the crippled box to another machine on the same network. When you enter single user mode, root file system is mounted read-only so one of the first things you need to do is mount -u -o rw /. Next, you need to mount your other file systems (/usr is usually a separate file system and that's where ssh lives) so do mount -a. At this point you might as well cancel the single-user mode by exiting the shell and go multi-user. If there are file system errors. mount -a will fail and you'll need to mount other file systems by hand. signature.asc Description: OpenPGP digital signature
Re: Starting and using services -- Single-user mode -- TECRA_A9-S9017
Ivan Voras wrote: [EMAIL PROTECTED] wrote: I have the need to start and use service while in single_user mode. To this point I'm not able to use 'top' or 'ps' respectively. In ps is in /bin, top is in /usr/bin ; unless you a) have your PATH wrong or b) commonly put /bin on separate file systems, you should be able to use ps and others in /bin and /sbin. addition,from the CLI; when I attempt to start services such as 'portmap' and 'sshd' nothing is shown running via 'ps'. All I see are the headers when I issue th 'ps aux' command. Are your world and kernel matched? This is a failed 4.x to 5.x upgrade which I really don't want to address any further. Currently, as a last effort to save this 'current' install I'm doing a 'make buildworld, buildkernel, installkernel and installworld as we speak. Should this fail I'll continue with the topic of this discussion = while in single-user mode, start enough services to use 'scp' and 'mv' curcial files over to another machine thereafter do a fresh install on the failed box in question. I'm sure its possible to do what I'm attempting, but given the crippled situation of this box, I'm stuck in Single-user mode and need to start enough services that will allow the use of 'scp' in order to move some zipped/crucial files from the crippled box to another machine on the same network. Until now I've tried fsck -p ; mount -u / ; mount -a -t ufs ; swapon -a We will try your suggestions once the building finishes (on it own) to first see if the new build process has fixed everything (multi-user) that was broken and if not, we'll follow your recommendation(s). When you enter single user mode, root file system is mounted read-only so one of the first things you need to do is mount -u -o rw /. Next, you need to mount your other file systems (/usr is usually a separate file system and that's where ssh lives) so do mount -a. At this point you might as well cancel the single-user mode by exiting the shell and go multi-user. If there are file system errors. mount -a will fail and you'll need to mount other file systems by hand. The only errors or warnings we've experienced where listed in the 4.x to 5.x section of the 5.5 /usr/src/UPDATING file with reference to 'userland' The UPDATING said to ignore these errors. Obviously something is seriously wrong with that section on updating from 4.x to 5.x Enough said, we'll post one way or the other once the build is done. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Fri, Dec 07, 2007 at 02:33:25PM +, Frank Shute wrote: On Fri, Dec 07, 2007 at 01:56:33PM +0100, Erik Trulsson wrote: On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: snip Thanks for all the tips on this subject. One more question: How would I enable a local keyboard layout in single user mode? I have had to find '/' by trial and error on my UK keyboard. You can use kbdcontrol(1) to load a new keyboard mapping. (Probably requires that /usr is already mounted to work correctly.) You can also specify in the kernel config file which keyboard layout should be used by default. See the atkbd(4) or ukbd(4) manpages for details. You can also specify it in /etc/rc.conf: keymap=uk.cp850 When you boot into single user mode (which the question was about) the settings in /etc/rc.conf has not been applied yet. That happens later in the boot process. -- Insert your favourite quote here. Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Fri, Dec 07, 2007 at 01:56:33PM +0100, Erik Trulsson wrote: On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: snip Thanks for all the tips on this subject. One more question: How would I enable a local keyboard layout in single user mode? I have had to find '/' by trial and error on my UK keyboard. You can use kbdcontrol(1) to load a new keyboard mapping. (Probably requires that /usr is already mounted to work correctly.) You can also specify in the kernel config file which keyboard layout should be used by default. See the atkbd(4) or ukbd(4) manpages for details. You can also specify it in /etc/rc.conf: keymap=uk.cp850 -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: On Mon, 3 Dec 2007 13:53:02 -0500 Philip M. Gollucci [EMAIL PROTECTED] wrote: Jorn Argelo wrote: RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) *cough* /rescue/vi Thanks for all the tips on this subject. One more question: How would I enable a local keyboard layout in single user mode? I have had to find '/' by trial and error on my UK keyboard. You can use kbdcontrol(1) to load a new keyboard mapping. (Probably requires that /usr is already mounted to work correctly.) You can also specify in the kernel config file which keyboard layout should be used by default. See the atkbd(4) or ukbd(4) manpages for details. -- Insert your favourite quote here. Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Mon, 3 Dec 2007 13:53:02 -0500 Philip M. Gollucci [EMAIL PROTECTED] wrote: Jorn Argelo wrote: RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) *cough* /rescue/vi Thanks for all the tips on this subject. One more question: How would I enable a local keyboard layout in single user mode? I have had to find '/' by trial and error on my UK keyboard. -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
El lunes 03 de diciembre a las 19:14:12 CET, RW escribió: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You can copy /usr/share/misc/termcap.db to /root/.termcap.db and use /rescue/vi. Only / and /tmp is needed. Regards pgpJ8kyXu7D5b.pgp Description: PGP signature
Re: What's the point of the shell choice in single user mode? [now: keyboards]
On Fri, Dec 07, 2007 at 03:42:45PM +0100, Erik Trulsson wrote: On Fri, Dec 07, 2007 at 02:33:25PM +, Frank Shute wrote: On Fri, Dec 07, 2007 at 01:56:33PM +0100, Erik Trulsson wrote: On Fri, Dec 07, 2007 at 12:43:35PM +, John Murphy wrote: snip Thanks for all the tips on this subject. One more question: How would I enable a local keyboard layout in single user mode? I have had to find '/' by trial and error on my UK keyboard. You can use kbdcontrol(1) to load a new keyboard mapping. (Probably requires that /usr is already mounted to work correctly.) You can also specify in the kernel config file which keyboard layout should be used by default. See the atkbd(4) or ukbd(4) manpages for details. You can also specify it in /etc/rc.conf: keymap=uk.cp850 When you boot into single user mode (which the question was about) the settings in /etc/rc.conf has not been applied yet. That happens later in the boot process. Thanks for correcting me. I always go into single user from multi-user so I guess it has been applied already. Thanks for the tip about setting it in the kernel config, I'll do that in case I have to boot into single user from boot-up. The handbook seems a bit sparse about keyboards. Wouldn't it be a good idea to recommend to all foreign users to set their keyboard in their kernel config? I assume it defaults to US. Just what you need in an emergency, a keyboard out of whack ;) -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
Jorn Argelo wrote: RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) *cough* /rescue/vi -- Philip M. Gollucci ([EMAIL PROTECTED]) o:703.549.2050x206 Senior System Admin - Riderway, Inc. http://riderway.com / http://ridecharge.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
---BeginMessage--- Philip M. Gollucci wrote: Jorn Argelo wrote: RW wrote: On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [1][EMAIL PROTECTED] wrote: Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. I think vi will also fail unless it has access to termcap, so you'd need /usr mounted too. You'd need to mount /usr anyway, as the vi binary is located in /usr/bin ;-) *cough* /rescue/vi Ah good point, forgot about that one. Cheers References 1. mailto:[EMAIL PROTECTED] ---End Message--- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
John Murphy wrote: On Sat, 1 Dec 2007 06:18:13 + RW [EMAIL PROTECTED] wrote: On Sat, 1 Dec 2007 04:44:27 + John Murphy [EMAIL PROTECTED] wrote: I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. ... I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. Selecting /bin/[t]csh always works for me. I just tried it again with exactly the same results (FreeBSD-7.0 beta3): [after pressing 4 at the Beasty menu] Trying to mount root from ufs:/dev/ad4s2a Enter full path name of shell or RETURN for /bin/sh: /bin/tcsh sh: Cannot open /etc/termcap sh: using dumb terminal settings %fsck -p fsck: Command not found %mount -u / mount: Command not found %reboot reboot: Command not found %exit logout ... continues to a Login prompt. You simply don't have the commands in your PATH. Type /sbin/mount, /sbin/fsck, /sbin/reboot and so on, and it does work. Never tried using an setenv PATH /bin:/sbin:usr/bin:/usr/sbin(etc) in single user mode, but I reckon it works. Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. Regards, Jorn Pressing RETURN or typing /bin/sh gets a '#' prompt and working fsck etc. Is your /etc/termcap a symlink? ll /etc/termcap lrwxrwxrwx 1 root wheel 23 Nov 15 20:27 /etc/termcap - /usr/share/misc/termcap ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sun, 02 Dec 2007 18:48:33 +0100 Jorn Argelo [EMAIL PROTECTED] wrote: John Murphy wrote: [after pressing 4 at the Beasty menu] Trying to mount root from ufs:/dev/ad4s2a Enter full path name of shell or RETURN for /bin/sh: /bin/tcsh sh: Cannot open /etc/termcap sh: using dumb terminal settings %fsck -p fsck: Command not found %mount -u / mount: Command not found %reboot reboot: Command not found %exit logout ... continues to a Login prompt. You simply don't have the commands in your PATH. Type /sbin/mount, /sbin/fsck, /sbin/reboot and so on, and it does work. Never tried using an setenv PATH /bin:/sbin:usr/bin:/usr/sbin(etc) in single user mode, but I reckon it works. Thanks. Useful to know that those tools are all in /sbin I can confirm that setenv PATH works too. Also note that vi doesn't work by default as it needs to write to /tmp. So mount /tmp or re-mount / to RW permissions. Regards, Jorn -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sat, Dec 01, 2007 at 04:44:27AM +, John Murphy wrote: I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. fsck and mount were unknown commands and even though I could change directory to /usr or /home they were (apparently) empty! Scary! I now realise it was because they were not mounted of course. I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. On possible scenario is that /bin/sh has - somehow - been corrupted, deleted or otherwise made unusable. In that situation it is very nice to be able to choose some other shell so you can at least try to fix the problem. -- Insert your favourite quote here. Erik Trulsson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sat, Dec 01, 2007 at 02:15:26PM +0100, Erik Trulsson wrote: On Sat, Dec 01, 2007 at 04:44:27AM +, John Murphy wrote: I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. fsck and mount were unknown commands and even though I could change directory to /usr or /home they were (apparently) empty! Scary! I now realise it was because they were not mounted of course. I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. On possible scenario is that /bin/sh has - somehow - been corrupted, deleted or otherwise made unusable. In that situation it is very nice to be able to choose some other shell so you can at least try to fix the problem. And some individuals even seem to prefer [t]csh over sh! I know, what's that all about? ;-P (runs to a safe distance to watch the fireworks...) John - you would have had the same experience had you selected sh - only the root file system is mounted if you come up into single user, which is why the installworld instructions tell you to mount all your other local file systems. As for fsck and mount being unknown, I suspect that's due to a very conservative initial PATH under tcsh, but as I don't use it, I don't know for sure. And the termcap grumble is because /etc/termcap is actually a symlink to /usr/share/misc/termcap, which on your system is evidently not on your / fs. Dan -- Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ pgp70mFQf4TXJ.pgp Description: PGP signature
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 06:18:13 + RW [EMAIL PROTECTED] wrote: On Sat, 1 Dec 2007 04:44:27 + John Murphy [EMAIL PROTECTED] wrote: I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. ... I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. Selecting /bin/[t]csh always works for me. I just tried it again with exactly the same results (FreeBSD-7.0 beta3): [after pressing 4 at the Beasty menu] Trying to mount root from ufs:/dev/ad4s2a Enter full path name of shell or RETURN for /bin/sh: /bin/tcsh sh: Cannot open /etc/termcap sh: using dumb terminal settings %fsck -p fsck: Command not found %mount -u / mount: Command not found %reboot reboot: Command not found %exit logout ... continues to a Login prompt. Pressing RETURN or typing /bin/sh gets a '#' prompt and working fsck etc. Is your /etc/termcap a symlink? ll /etc/termcap lrwxrwxrwx 1 root wheel 23 Nov 15 20:27 /etc/termcap - /usr/share/misc/termcap -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 13:46:12 + Daniel Bye [EMAIL PROTECTED] wrote: On Sat, Dec 01, 2007 at 02:15:26PM +0100, Erik Trulsson wrote: On Sat, Dec 01, 2007 at 04:44:27AM +, John Murphy wrote: I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. fsck and mount were unknown commands and even though I could change directory to /usr or /home they were (apparently) empty! Scary! I now realise it was because they were not mounted of course. I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. On possible scenario is that /bin/sh has - somehow - been corrupted, deleted or otherwise made unusable. In that situation it is very nice to be able to choose some other shell so you can at least try to fix the problem. And some individuals even seem to prefer [t]csh over sh! I know, what's that all about? ;-P (runs to a safe distance to watch the fireworks...) John - you would have had the same experience had you selected sh - only the root file system is mounted if you come up into single user, which is why the installworld instructions tell you to mount all your other local file systems. As for fsck and mount being unknown, I suspect that's due to a very conservative initial PATH under tcsh, but as I don't use it, I don't know for sure. And the termcap grumble is because /etc/termcap is actually a symlink to /usr/share/misc/termcap, which on your system is evidently not on your / fs. Ah, that explains it. /usr is indeed elsewhere ad4s2f in fact. [t]csh always gets my vote. (The government still seems to win though) :) -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 14:06:19 + John Murphy [EMAIL PROTECTED] wrote: On Sat, 1 Dec 2007 06:18:13 + RW [EMAIL PROTECTED] wrote: Selecting /bin/[t]csh always works for me. I just tried it again with exactly the same results (FreeBSD-7.0 beta3): [after pressing 4 at the Beasty menu] Trying to mount root from ufs:/dev/ad4s2a Enter full path name of shell or RETURN for /bin/sh: /bin/tcsh sh: Cannot open /etc/termcap sh: using dumb terminal settings %fsck -p fsck: Command not found I see what you mean - I do get that. I thought you were saying that /bin/tcsh wasn't starting. Personally I just put all the commands for the single-user mode install into a simple script and run that. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
What's the point of the shell choice in single user mode?
I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. fsck and mount were unknown commands and even though I could change directory to /usr or /home they were (apparently) empty! Scary! I now realise it was because they were not mounted of course. I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. -- Thanks, John. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What's the point of the shell choice in single user mode?
On Sat, 1 Dec 2007 04:44:27 + John Murphy [EMAIL PROTECTED] wrote: I've just successfully done the world and kernel upgrade from 7 beta2 to beta3. I've always had a mergemaster phobia, but it didn't seem too bad this time. I thought I'd broken it after choosing /bin/tcsh as my shell in single user mode. It grumbled about termcap (I think) and then gave me a simple shell with a % prompt. ... I'll know to always accept the suggested /bin/sh in future, but I was wondering if the only reason a choice of a different shell is offered is to scare the unwary. Selecting /bin/[t]csh always works for me. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: edit files in single-user-mode, the output is all messed up
Christian Walther wrote: On 11/05/07, Gabriel Rossetti [EMAIL PROTECTED] wrote: Hello, I have never been able to figure out how to do this, and I usually end up copying the file to be edited to a floppy et be able to edit it from another machine, but there has to ba a way to do it! Everytime I go into single-user-mode and I have to edit a file, the output to stdout is messed up (looks like there are no \n). I tried several editors (vi, ee, edit (ee I think), and I get the same thing, useless to say that it's impossible to edit the files. The only editor that works, is vim, but it's not always installed. Does anyone know why this happens? And does anyone know how to fix it? You could try to set a decent TERM-variable, such as TERM=vt100 export TERM HTH Christian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Ok, thanks Christian! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: edit files in single-user-mode, the output is all messed up
Jerry McAllister wrote: On Fri, May 11, 2007 at 04:51:48PM +0200, Christian Walther wrote: On 11/05/07, Gabriel Rossetti [EMAIL PROTECTED] wrote: Hello, I have never been able to figure out how to do this, and I usually end up copying the file to be edited to a floppy et be able to edit it from another machine, but there has to ba a way to do it! Everytime I go into single-user-mode and I have to edit a file, the output to stdout is messed up (looks like there are no \n). I tried several editors (vi, ee, edit (ee I think), and I get the same thing, useless to say that it's impossible to edit the files. The only editor that works, is vim, but it's not always installed. Does anyone know why this happens? And does anyone know how to fix it? The two main problems are making sure the editors are available and making sure you have a terminal type that will work. Do the following: fsck -p mount -u / mount -a swapon -a To make sure files are available. Then, for termtype, if you are using tcsh which is most common on FreeBSD do set term=vt100 or if in sh do as Christian Walther indicated jerry Ok, thanks Jerry! You could try to set a decent TERM-variable, such as TERM=vt100 export TERM HTH Christian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
edit files in single-user-mode, the output is all messed up
Hello, I have never been able to figure out how to do this, and I usually end up copying the file to be edited to a floppy et be able to edit it from another machine, but there has to ba a way to do it! Everytime I go into single-user-mode and I have to edit a file, the output to stdout is messed up (looks like there are no \n). I tried several editors (vi, ee, edit (ee I think), and I get the same thing, useless to say that it's impossible to edit the files. The only editor that works, is vim, but it's not always installed. Does anyone know why this happens? And does anyone know how to fix it? Thank you, Gabriel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: edit files in single-user-mode, the output is all messed up
On 11/05/07, Gabriel Rossetti [EMAIL PROTECTED] wrote: Hello, I have never been able to figure out how to do this, and I usually end up copying the file to be edited to a floppy et be able to edit it from another machine, but there has to ba a way to do it! Everytime I go into single-user-mode and I have to edit a file, the output to stdout is messed up (looks like there are no \n). I tried several editors (vi, ee, edit (ee I think), and I get the same thing, useless to say that it's impossible to edit the files. The only editor that works, is vim, but it's not always installed. Does anyone know why this happens? And does anyone know how to fix it? You could try to set a decent TERM-variable, such as TERM=vt100 export TERM HTH Christian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: edit files in single-user-mode, the output is all messed up
On Fri, May 11, 2007 at 04:51:48PM +0200, Christian Walther wrote: On 11/05/07, Gabriel Rossetti [EMAIL PROTECTED] wrote: Hello, I have never been able to figure out how to do this, and I usually end up copying the file to be edited to a floppy et be able to edit it from another machine, but there has to ba a way to do it! Everytime I go into single-user-mode and I have to edit a file, the output to stdout is messed up (looks like there are no \n). I tried several editors (vi, ee, edit (ee I think), and I get the same thing, useless to say that it's impossible to edit the files. The only editor that works, is vim, but it's not always installed. Does anyone know why this happens? And does anyone know how to fix it? The two main problems are making sure the editors are available and making sure you have a terminal type that will work. Do the following: fsck -p mount -u / mount -a swapon -a To make sure files are available. Then, for termtype, if you are using tcsh which is most common on FreeBSD do set term=vt100 or if in sh do as Christian Walther indicated jerry You could try to set a decent TERM-variable, such as TERM=vt100 export TERM HTH Christian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
On Sunday 17 September 2006 23:51, backyard wrote: modems are relatively cheap. And, if you put it into call-back mode, it becomes one of the most secure methods of doing a remote serial console; plus you have the added advantage of the remote site footing the bill for the call :-) Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
--- Bob [EMAIL PROTECTED] wrote: On Sunday 17 September 2006 23:51, backyard wrote: modems are relatively cheap. And, if you put it into call-back mode, it becomes one of the most secure methods of doing a remote serial console; plus you have the added advantage of the remote site footing the bill for the call :-) Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] and billing a client directly for working on their equipment is always better then waiting on POs... By call-back mode do you mean log into the system via network and have it call your local system for administration, or is it like a *69 scenario. Its been a while since I played with my modem. -brian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
Hi there... Just to contribute, I also ALWAYS upgrade my systems without single user mode, for remote reasons... ;-) Same instructions: shut down all services, except inetd/ssh, installworld, mergemaster and reboot... I even posted in this list, months ago, a step-by-step to remotely upgrade from 4.x to 6.x. I agree that this is a very risky task, but before the first production server, I tried more than 40 times (not kidding) in my test lab. []´s -- Rafael Mentz Aquino BSDServer Ltda. 51 - 9847 8825 -- Original Message --- From: Daniel Gerzo [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Sun, 17 Sep 2006 22:32:05 +0200 Subject: Re: rebooting into single user mode on a remote server Hello pobox, Saturday, September 16, 2006, 8:47:04 PM, you wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. I don't want to persuade you to something that is not officially supported, but I have never booted into single user mode while upgrading my FreeBSD boxes and I have never experienced any problems because of this. Just try to skip the reboot step and go ahead. It works(tm) for me this way. If you are paranoid, try to stop all running services except the ssh deamon. -- Best regards, Danielmailto:[EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] --- End of Original Message --- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
On Monday 18 September 2006 13:51, backyard wrote: By call-back mode do you mean log into the system via network and have it call your local system for administration No modems like the US Robotics V.Everything can be programmed with a call-back feature. You dial up the modem, it askes you for a password, you supply the password, and it then hangs up on you, picks up the line, and calls back a configured phone number. You program the modem to call YOU back on a number which has a modem connected, and waiting for an inbound data call. your modem answers, and you are connected. You then negotiate access to the server (name/passwd) over the serial link. If the remote is connected to the the target serial port consol, you have a pretty hack-proof (nothing is really hack-proof) console access. The modem will only call a pre-set number, so even if someone got your password, the modem would only call you, not the hacker. Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
--- Bob [EMAIL PROTECTED] wrote: On Monday 18 September 2006 13:51, backyard wrote: By call-back mode do you mean log into the system via network and have it call your local system for administration No modems like the US Robotics V.Everything can be programmed with a call-back feature. You dial up the modem, it askes you for a password, you supply the password, and it then hangs up on you, picks up the line, and calls back a configured phone number. You program the modem to call YOU back on a number which has a modem connected, and waiting for an inbound data call. your modem answers, and you are connected. You then negotiate access to the server (name/passwd) over the serial link. If the remote is connected to the the target serial port consol, you have a pretty hack-proof (nothing is really hack-proof) console access. The modem will only call a pre-set number, so even if someone got your password, the modem would only call you, not the hacker. Bob ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] so thats why the Couriers were the Cadillacs of the phone lines... Never had one with such fancyness built-in to it. That is good to know for the future. I would concur security is an illusion we fill with smoke and mirrors to confuse management... I especially like messing with IT at my job when they tell me they have locked access off the network with a new administrators password and Windows Server 2003... Of course they don't lock the doors on the server room so I can go in there with a boot disk of my liking and gain access to whatever I want, or run a bulk tape eraser passed the RAIDS... :) now if I can just convince the head of IT he doesn't need that Courier V.Everything anymore... -brian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
Hello pobox, Saturday, September 16, 2006, 8:47:04 PM, you wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. I don't want to persuade you to something that is not officially supported, but I have never booted into single user mode while upgrading my FreeBSD boxes and I have never experienced any problems because of this. Just try to skip the reboot step and go ahead. It works(tm) for me this way. If you are paranoid, try to stop all running services except the ssh deamon. -- Best regards, Danielmailto:[EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
Daniel Gerzo wrote: Hello pobox, Saturday, September 16, 2006, 8:47:04 PM, you wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. I don't want to persuade you to something that is not officially supported, but I have never booted into single user mode while upgrading my FreeBSD boxes and I have never experienced any problems because of this. Just try to skip the reboot step and go ahead. It works(tm) for me this way. If you are paranoid, try to stop all running services except the ssh deamon. Phew... I hear this again and again. Only I am not sure I have the level of boldness to do this on a production machine. Isn't the following sequence of steps similar - 'shutdown -r now' (reboots in multi-user mode), and then immediately 'shutdown now' (drops to single user mode)? Iv. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
- Original Message - From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Daniel Gerzo [EMAIL PROTECTED] Subject: Re: rebooting into single user mode on a remote server Date: Sun, 17 Sep 2006 23:49:34 +0200 Daniel Gerzo wrote: Hello pobox, Saturday, September 16, 2006, 8:47:04 PM, you wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. I don't want to persuade you to something that is not officially supported, but I have never booted into single user mode while upgrading my FreeBSD boxes and I have never experienced any problems because of this. Just try to skip the reboot step and go ahead. It works(tm) for me this way. If you are paranoid, try to stop all running services except the ssh deamon. Phew... I hear this again and again. Only I am not sure I have the level of boldness to do this on a production machine. Isn't the following sequence of steps similar - 'shutdown -r now' (reboots in multi-user mode), and then immediately 'shutdown now' (drops to single user mode)? Iv. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] dudes, I never tried it, and not dare to try it.. because it's a remote server and single mode maybe ( I'm not sure dude ) cut off all network connections from inside and outside.. anyway for remote servers, i'm prefer make installwold in normal mode.. it's safer TQ -- ___ Play 100s of games for FREE! http://games.mail.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
--- Ahmad Arafat Abdullah [EMAIL PROTECTED] wrote: - Original Message - From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Daniel Gerzo [EMAIL PROTECTED] Subject: Re: rebooting into single user mode on a remote server Date: Sun, 17 Sep 2006 23:49:34 +0200 Daniel Gerzo wrote: Hello pobox, Saturday, September 16, 2006, 8:47:04 PM, you wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. I don't want to persuade you to something that is not officially supported, but I have never booted into single user mode while upgrading my FreeBSD boxes and I have never experienced any problems because of this. Just try to skip the reboot step and go ahead. It works(tm) for me this way. If you are paranoid, try to stop all running services except the ssh deamon. Phew... I hear this again and again. Only I am not sure I have the level of boldness to do this on a production machine. Isn't the following sequence of steps similar - 'shutdown -r now' (reboots in multi-user mode), and then immediately 'shutdown now' (drops to single user mode)? Iv. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] dudes, I never tried it, and not dare to try it.. because it's a remote server and single mode maybe ( I'm not sure dude ) cut off all network connections from inside and outside.. anyway for remote servers, i'm prefer make installwold in normal mode.. it's safer TQ the best possible only way is to use a serial console via a modem, which could drop out during the update, or a network accessable serial multiplexer. Those are expensive, modems are relatively cheap. Both require a serial console enabled kernel on the server. the only other way would be to have a cheap old box that can be connected to over the network with a null modem between it and the server. you would want this box to be UBER secured because it is a console to the system. There are ways of doing this so that a remote trigger is required to boot this system, but such methods require relays, a soldering iron, and some paranoia to complete. The gist of it is you will need a serial console on the server. Then you need a way to connect this serial line to your remote location. the easiest. cheapest, and least likely to fail is an old 486 or p1. p2 whatever you have lieing around that can be remoted connected to via ssh. if security is a concern you should use a key connection with no passwords. the user on that box doesn't have to be root, but he will need to be able to access the serial ports. then via a communications program available in ports take your pick you connect via a null modem to the server. you can then login and shutdown to single user mode on the server and upgrade to your hearts desires. -brian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
rebooting into single user mode on a remote server
Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. The only solution I found so far is to do 'shutdown -r now' and when the server boots to login with ssh and do 'shutdown now' - which should drop it to single user mode. I can ask the support at the hosting location to reboot in single user mode, but I do not know if I will have ssh then? Alternatively I can ask them to do the last few steps. Thank you for your advises, Iv. -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
[EMAIL PROTECTED] wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. The only solution I found so far is to do 'shutdown -r now' and when the server boots to login with ssh and do 'shutdown now' - which should drop it to single user mode. I can ask the support at the hosting location to reboot in single user mode, but I do not know if I will have ssh then? Alternatively I can ask them to do the last few steps. Yep. You've become the latest person to realise this perennial problem. In order to follow the upgrade instructions in the Handbook or /usr/src/UPDATING to the letter, you need console access to the machine being updated. That is no problem when the machine is on your desk, or probably not if it's just down the hall. But when it's in a hosting centre umpty dozen miles away and you can't actually get to it? There are essentially three possibilities. i) You've thought of this approach already: get someone local to the machine to do the bits requiring the console access. That works if the people at the other site are competent and trustworthy, and you can afford to pay for their time. ii) The next solution, and on the whole, probably the best solution available, is to arrange to get remote console access. That can be expensive if you go down the route of buying a dedicated console server. Or it can be very cheap indeed if you have another FreeBSD box close by the machine you're trying to update and you can string null modem cables between their serial ports. Then you configure your FreeBSD box requiring update to use ttya as its console and use tip(1) to get into it from the other machine. (Actually, you could probably make that approach work from any other unixoid OS or even from Windows so long as you can find the right serial console emulation software). If you're really lucky, you're running flashy new hardware with IPMI or similar lights out management capability and can get into the machine through that. It doesn't work in anything like the same way as a serial console, but the end result is just as good. iii) Finally, and not to be dismissed without due consideration, is the really quite simple approach of /not/ taking the machine down to single user mode. Most of the time, you can quite happily run 'make installworld' or 'make installkernel' or 'mergemaster' while the system is in multiuser mode. You should shutdown all active services except what you need to get in remotely and you should kick any other users off the machine as well as generally taking steps to ensure the machine is as quiescent as possible before trying that. You should also have a 'back to square one' plan for dealing with the eventuality that the machine does not come back after attempting to reboot into the new kernel -- you really absolutely will require someone quite FreeBSD savvy to get onto the console to unfuck things if so, and that illustrates the big drawback to this approach: if it goes wrong, you are truly left up a gum tree without a paddle. Don't try approach (iii) for an upgrade over too many version numbers at once. Jumping from, say 6.1-RELEASE to 6.1-RELEASE-p6 should be feasible, as should jumping from 6.0-RELEASE to 6.1-RELEASE. Going from say 5.5-RELEASE to 6.1-RELEASE is only for the brave or the most highly skilled, and anything more than that is only for the foolhardy. Neither is it a good idea to do method (iii) if you're making any major changes to the hardware on the system. Nor does approach (iii) mix at all well with the use of raised secure levels. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: rebooting into single user mode on a remote server
On Sep 17, 2006, at 2:47 AM, [EMAIL PROTECTED] wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. I had this same issue last week... fortunately, my hosting provider had a remote KVM solution and hooked it up to my server while I got the job done. btw, that provider was m5hosting.com. I originally found them from the freebsd.org community page and have been very happy with their knowledge and support. good luck, ke han The only solution I found so far is to do 'shutdown -r now' and when the server boots to login with ssh and do 'shutdown now' - which should drop it to single user mode. I can ask the support at the hosting location to reboot in single user mode, but I do not know if I will have ssh then? Alternatively I can ask them to do the last few steps. Thank you for your advises, Iv. -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions- [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
In order to follow the upgrade instructions in the Handbook or /usr/src/UPDATING to the letter, you need console access to the machine being updated. That is [a] problem ... when it's in a hosting centre umpty dozen miles away ... There are essentially three possibilities. i) get someone local to the machine to do the bits requiring the console access ... ii) arrange to get remote console access. That can be expensive if you go down the route of buying a dedicated console server. Or it can be very cheap indeed if you have another FreeBSD box close by the machine you're trying to update and you can string null modem cables between their serial ports ... iii) Finally, and not to be dismissed without due consideration, is the really quite simple approach of /not/ taking the machine down to single user mode ... iv) (actually a variant of ii, but different enough to warrant separate mention IMO) Put a PC Weasel or similar in any machine that is going to be located remotely. This card looks like a VGA to the machine, but allows for remote access. The simple ones support only text mode via a serial port; some of the fancier ones act as X11 clients so as to also support graphics modes. This gives you access not only to the FreeBSD console, but to the BIOS. And no, I do not work for any manufacturer or supplier of such. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rebooting into single user mode on a remote server
Matthew Seaman wrote: [EMAIL PROTECTED] wrote: Hello, could somebody help me to understand the best way to enter into a single user mode on a remote server. I need it for the moment, during rebuilding world, when I have to reboot into single user mode before 'mergemaster -p'. The only solution I found so far is to do 'shutdown -r now' and when the server boots to login with ssh and do 'shutdown now' - which should drop it to single user mode. I can ask the support at the hosting location to reboot in single user mode, but I do not know if I will have ssh then? Alternatively I can ask them to do the last few steps. Yep. You've become the latest person to realise this perennial problem. In order to follow the upgrade instructions in the Handbook or /usr/src/UPDATING to the letter, you need console access to the machine being updated. That is no problem when the machine is on your desk, or probably not if it's just down the hall. But when it's in a hosting centre umpty dozen miles away and you can't actually get to it? There are essentially three possibilities. i) You've thought of this approach already: get someone local to the machine to do the bits requiring the console access. That works if the people at the other site are competent and trustworthy, and you can afford to pay for their time. ii) The next solution, and on the whole, probably the best solution available, is to arrange to get remote console access. That can be expensive if you go down the route of buying a dedicated console server. Or it can be very cheap indeed if you have another FreeBSD box close by the machine you're trying to update and you can string null modem cables between their serial ports. Then you configure your FreeBSD box requiring update to use ttya as its console and use tip(1) to get into it from the other machine. (Actually, you could probably make that approach work from any other unixoid OS or even from Windows so long as you can find the right serial console emulation software). If you're really lucky, you're running flashy new hardware with IPMI or similar lights out management capability and can get into the machine through that. It doesn't work in anything like the same way as a serial console, but the end result is just as good. iii) Finally, and not to be dismissed without due consideration, is the really quite simple approach of /not/ taking the machine down to single user mode. Most of the time, you can quite happily run 'make installworld' or 'make installkernel' or 'mergemaster' while the system is in multiuser mode. You should shutdown all active services except what you need to get in remotely and you should kick any other users off the machine as well as generally taking steps to ensure the machine is as quiescent as possible before trying that. You should also have a 'back to square one' plan for dealing with the eventuality that the machine does not come back after attempting to reboot into the new kernel -- you really absolutely will require someone quite FreeBSD savvy to get onto the console to unfuck things if so, and that illustrates the big drawback to this approach: if it goes wrong, you are truly left up a gum tree without a paddle. Don't try approach (iii) for an upgrade over too many version numbers at once. Jumping from, say 6.1-RELEASE to 6.1-RELEASE-p6 should be feasible, as should jumping from 6.0-RELEASE to 6.1-RELEASE. Going from say 5.5-RELEASE to 6.1-RELEASE is only for the brave or the most highly skilled, and anything more than that is only for the foolhardy. Neither is it a good idea to do method (iii) if you're making any major changes to the hardware on the system. Nor does approach (iii) mix at all well with the use of raised secure levels. Cheers, Matthew Matthew, thanks (and all others) for the detailed reply. The possibilities are now kind of clear to me and I'll have to work out which one I can implement best. Thanks a lot again, Iv ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
can't get a shell while choosing single user mode
Hi, all I just upgrade my freebsd 4.11 to 6.0. While using 4.11, I used to enter single user mode and run fsck on all filesystem every month. Recently, I tried to enter single user mode under 6.0 but can't get a shell to do anything. What should I do to get it done? Thanks, Vincent Chen ___ 最新版 Yahoo!奇摩即時通訊 7.0,免費網路電話任你打! http://messenger.yahoo.com.tw/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: can't get a shell while choosing single user mode
in message [EMAIL PROTECTED], wrote Vincent Chen thusly... I just upgrade my freebsd 4.11 to 6.0. While using 4.11, I used to enter single user mode and run fsck on all filesystem every month. Recently, I tried to enter single user mode under 6.0 but can't get a shell to do anything. What should I do to get it done? What exactly do you type, and what is the response that you get? Is your PATH set? Did you try using commands available under /rescue (with absolute path as in /rescue/ls)? - Parv -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Urgent Help needed: How to boot in single user mode with usb keyboard
Hi, I am currently in a maintenance window trying to rebuildworld... I am doing it on a dell poweredge with a built in drac wich emulate a usb keyboard... When I need to boot on the drac, I need to use boot with usb keyboard in the menu... Now I need to boot in single mode WITH usb keyboard and I can't figure out... I saw in a post that I could do the following in boot loader: set hint.atkbd.0.flags=0x1 boot -s But it doesnt work... Any help would be greatly appreciated Thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Urgent Help needed: How to boot in single user mode with usb keyboard
Ian Lord wrote: Hi, I am currently in a maintenance window trying to rebuildworld... I am doing it on a dell poweredge with a built in drac wich emulate a usb keyboard... When I need to boot on the drac, I need to use boot with usb keyboard in the menu... Now I need to boot in single mode WITH usb keyboard and I can't figure out... I saw in a post that I could do the following in boot loader: set hint.atkbd.0.flags=0x1 boot -s Is the kernel you boot built with support for usb keyboard? if not, I think you can do something like load ukbd boot -s you may also need some other modules depending on your hardware. Cheers, Erik -- Ph: +34.666334818 web: www.locolomo.org S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt Subject ID: 9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72 Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Remote Single User Mode?
On 3/24/06, Chris [EMAIL PROTECTED] wrote: On 23/03/06, Chris Maness [EMAIL PROTECTED] wrote: Eric Schultz wrote: Kris Kennaway wrote: On Wed, Mar 22, 2006 at 10:11:48AM -0800, Chris Maness wrote: I administer this box by remote. Look into setting up a serial console; this is the remote single user mode you're looking for. Good morning... How remote is remote? If it's just down the hall you can probably get a DB25/DB9 (depending on the machine) to RJ45 adapter and use existing CAT5 cable to get to a serial console to your desk. There even exist serial RJ45 switch boxes if you have several machines to remote administer. If it's farther than that, like in another building/city/etc. you can always setup a modem on the box's serial port and dial in to that. You'll need a modem at your end too, which means either an analog line or a analog-to-digital tap for your office phone. I have no idea whether there any serial-over-IP solutions. But you could build one with FreeBSD!!! I have a slave name server at the same location. Maybe I can run a serial cable with a crosover between the two of them. ___ I think the docs are just playing safe, I admin over 10 servers and have remote updated each one at least once, I have never had any problems doing all this in multi user mode. make buildworld make buildkernel make installkernel reboot mergemaster -p make installworld mergemaster -iv reboot Chris 5.4 = 6.0 upgrade caused some problems on a box under high load until I used a serial console and did everything by the book. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Remote Single User Mode?
Chris wrote: On 23/03/06, Chris Maness [EMAIL PROTECTED] wrote: Eric Schultz wrote: Kris Kennaway wrote: On Wed, Mar 22, 2006 at 10:11:48AM -0800, Chris Maness wrote: I administer this box by remote. Look into setting up a serial console; this is the remote single user mode you're looking for. Good morning... How remote is remote? If it's just down the hall you can probably get a DB25/DB9 (depending on the machine) to RJ45 adapter and use existing CAT5 cable to get to a serial console to your desk. There even exist serial RJ45 switch boxes if you have several machines to remote administer. If it's farther than that, like in another building/city/etc. you can always setup a modem on the box's serial port and dial in to that. You'll need a modem at your end too, which means either an analog line or a analog-to-digital tap for your office phone. I have no idea whether there any serial-over-IP solutions. But you could build one with FreeBSD!!! I have a slave name server at the same location. Maybe I can run a serial cable with a crosover between the two of them. ___ I think the docs are just playing safe, I admin over 10 servers and have remote updated each one at least once, I have never had any problems doing all this in multi user mode. make buildworld make buildkernel make installkernel reboot mergemaster -p make installworld mergemaster -iv reboot Chris Yep, I went ahead and did it in multi user mode. No problems. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Remote Single User Mode?
On 23/03/06, Chris Maness [EMAIL PROTECTED] wrote: Eric Schultz wrote: Kris Kennaway wrote: On Wed, Mar 22, 2006 at 10:11:48AM -0800, Chris Maness wrote: I administer this box by remote. Look into setting up a serial console; this is the remote single user mode you're looking for. Good morning... How remote is remote? If it's just down the hall you can probably get a DB25/DB9 (depending on the machine) to RJ45 adapter and use existing CAT5 cable to get to a serial console to your desk. There even exist serial RJ45 switch boxes if you have several machines to remote administer. If it's farther than that, like in another building/city/etc. you can always setup a modem on the box's serial port and dial in to that. You'll need a modem at your end too, which means either an analog line or a analog-to-digital tap for your office phone. I have no idea whether there any serial-over-IP solutions. But you could build one with FreeBSD!!! I have a slave name server at the same location. Maybe I can run a serial cable with a crosover between the two of them. ___ I think the docs are just playing safe, I admin over 10 servers and have remote updated each one at least once, I have never had any problems doing all this in multi user mode. make buildworld make buildkernel make installkernel reboot mergemaster -p make installworld mergemaster -iv reboot Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]