Re: how to add space
Jerry McAllister [EMAIL PROTECTED] writes: At 05:14 PM 10/26/2002 +0100, you wrote: Perhaps I have to install a boot manager - but which how? I don't think it would be that much trouble to use Partition Magic, delete slice1 and then reo the fdisk and the rest of the mounting process - but I should then install the boot manager - but will it install it on slice 1 (ad0s1) ? I suppose from there, the boot manager should poinbt to slice 2 to boot... I don't think the boot manager goes in any slice. It goes before them in the boot sector. It gets read up and executed and it lets you select which bootable slice you want to boot up. That's correct, but it's only the full story for the standard FreeBSD boot manager (BootEasy). Other boot managers are too large to fit entirely in the Master Boot Record, and need to access a disk slice for partial functionality. It is also possible to put a boot manager in a slice, but this is only useful if the boot manager in the MBR is able to boot that slice. I *very* rarely use my boot manager to do anything but boot my FreeBSD root partition, so I like BootEasy, because if anything bad happens to it, I can fix it easily. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
At 03:21 PM 10/24/2002 +0100, you wrote: Big problem after settin up - now there are 2 active partitions - how do I de-activate slice 1? /stand/sysinstall (Fdisk) refused to mark just slice 2 as active even though I checked and set it two times... :(( I think there is something that doesn't click with the procedure below either because something is wrong with my disk, motherboard or god-knows-what - see my comments: The easiest thing to do is probably to use some or all of the available 4Gb as a new filesystem mounted under /usr. For instance, /usr/local might be a good choice. You need to copy the current contents of /usr/local onto the new partition, move the old /usr/local aside somewhere and mount the new one in it's place: Assuming the disk partition where you have space is /dev/da2s2 something like the following (in single user mode): mount -a fdisk -i da2[ Mark slice 2 as belonging to FreeBSD ] This refused to work on my machine (ERROR: bas supercluster or something like that - apparently NTFS left the partition somewhat messy. I go around that by formatting with Partition Magic to linux and then deleting) and then I had to use /stand/sysinstall. disklabel -e da2s2 [ Create a 4.2BSD partition /dev/da2s2e, say ] This did not work until I used /stand/sysinstall to create ad0s1e (in my case) with Label but this required a mount point - /new. Thereafter, disklabel did work after checking with -n option first. fBut there now seems to be a partition ad0s1a with 0 space) newfs /dev/da2s2e mkdir /usr/local.new mount -t ufs /dev/da2s2e /usr/local.new rsync -avx /usr/local/ /usr/local.new/ [ rsync(1) is only one way to copy the whole directory tree over. Obviously, you need to install ports/net/rsync before dropping to single user... Another alternative might be: cd /usr/local ; tar -cf - . | ( cd /usr/local.new ; tar -xvpf - ) or there are similar methods using find+cpio, dump+restore etc.] umount /usr/local.new mv /usr/local /usr/local.old mkdir /usr/local mount -t ufs /dev/da2s2e /usr/local diff -ur /usr/local.old /usr/local [ make sure everything copied OK etc. ] vi /etc/fstab [ add /dev/da2s2e to standard mounts ] reboot Here is the problem - no partition information, hence, cannot boot - cheked with PM and found both slice 1 (ad0s1) and slice 2 (ad0s2) are marked active - I wonder what is going on here? How do I fix this? Partition magic cannot deactivate one of the slices - only way is to delete slice 1 but that is not very productive... :(( Now, when the system comes back up multiuser you should have a separate /usr/local partition containing the same files as the original /usr/local directory. Once you're satisfied that everything has gone according to plan you can delete /usr/local.old and make merry in the extra space that becomes available. PJ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
On Sat, Oct 26, 2002 at 10:29:01AM -0400, [EMAIL PROTECTED] wrote: At 03:21 PM 10/24/2002 +0100, you wrote: Big problem after settin up - now there are 2 active partitions - how do I de-activate slice 1? /stand/sysinstall (Fdisk) refused to mark just slice 2 as active even though I checked and set it two times... :(( You shouldn't be marking the modified partition active -- it's not meant to be bootable, just some extra storage space. This did not work until I used /stand/sysinstall to create ad0s1e (in my case) with Label but this required a mount point - /new. Thereafter, disklabel did work after checking with -n option first. fBut there now seems to be a partition ad0s1a with 0 space) Here is the problem - no partition information, hence, cannot boot - cheked with PM and found both slice 1 (ad0s1) and slice 2 (ad0s2) are marked active - I wonder what is going on here? How do I fix this? Partition magic cannot deactivate one of the slices - only way is to delete slice 1 but that is not very productive... :(( Ouch. So just to clarify, which slice is which? ad0s1 is your original FreeBSD slice containing (amongst other stuff) the root partition on ad0s1a ad0s2 was formerly NTFS, which you deleted using PartitionMagic and are trying to convert into a second FreeBSD slice? Is that correct? Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
At 05:14 PM 10/26/2002 +0100, you wrote: Yes, that is precisely what you need to do. Can you follow the instructions in http://www.freebsd.org/cgi/getmsg.cgi?fetch=419047+0+/usr/local/www/db/text/2002/freebsd-questions/20021006.freebsd-questions to get your system booted from ad0s2a? Strange results: But first, a question - I don't suppose that booting from v. 4.6.2 should make a difference or should it? I would think not, but then What is strange is that I get the list of what is installed: lsdev cd @ 0xef38 disk0: BIOS drive A: disk0a: FFS disk0c: FFS disk1: BIOS drive B: disk2: BIOS drive C: int= err= and so onfor 6 lines and then BTX halted and frozen :(( PJ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
At 05:14 PM 10/26/2002 +0100, you wrote: Perhaps I have to install a boot manager - but which how? I don't think it would be that much trouble to use Partition Magic, delete slice1 and then reo the fdisk and the rest of the mounting process - but I should then install the boot manager - but will it install it on slice 1 (ad0s1) ? I suppose from there, the boot manager should poinbt to slice 2 to boot... PJ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
At 05:14 PM 10/26/2002 +0100, you wrote: Perhaps I have to install a boot manager - but which how? I don't think it would be that much trouble to use Partition Magic, delete slice1 and then reo the fdisk and the rest of the mounting process - but I should then install the boot manager - but will it install it on slice 1 (ad0s1) ? I suppose from there, the boot manager should poinbt to slice 2 to boot... I don't think the boot manager goes in any slice. It goes before them in the boot sector. It gets read up and executed and it lets you select which bootable slice you want to boot up. I have only used the boot manager that gets put in when you select it on a FreeBSD install. It has worked fine for me. It indentifies stuff in an NTFS slice as ???, but that doesn't bother because I know what it is referring to. But, there are some other popular ones available that some people like, that look nicer and let you select boot in nice gui looking screens. Just make sure you install the FreeBSD boot manager after you install any Microsloth stuff, because that will wipe out anything you had in theree no matter what you try to tell it. jerry PJ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
Matthew Seaman [EMAIL PROTECTED] writes: That's the difference between 'shutdown now' or doing what I was thinking of, which is to reboot, hit the any key during the ten second count down and issue 'boot -s' at the boot manager prompt. Years of updating machines to the latest -STABLE has engrained that into my head as *the* way to get to single-user mode, but you're right: 'shutdown now' works too. For updating to a new kernel, you definitely want to keep doing the whole shutdown-and-reboot, because you want to be booting under your *newly*built* kernel. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
At 11:14 AM 10/25/2002 -0400, you wrote: Matthew Seaman [EMAIL PROTECTED] writes: That's the difference between 'shutdown now' or doing what I was thinking of, which is to reboot, hit the any key during the ten second count down and issue 'boot -s' at the boot manager prompt. Years of updating machines to the latest -STABLE has engrained that into my head as *the* way to get to single-user mode, but you're right: 'shutdown now' works too. For updating to a new kernel, you definitely want to keep doing the whole shutdown-and-reboot, because you want to be booting under your *newly*built* kernel. You're quite right, but the problem was how to get to the single-user mode before doing the upgrade... :)) Once the kernel is built and the build installworld is done one normally would shutdown and reboot - after updating all the relevant configuration files. PJ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
On Thu, Oct 24, 2002 at 09:50:12AM -0400, [EMAIL PROTECTED] wrote: How can I enlarge my /usr slice on a disk? Do I need to re-partition my disks? I have: 34gb Raid and 2 10gb SCSI HDD's. The RAID array is now NTFS and the other 2 are chopped into NTFS, fat16 and FreeBSD. I could add another 4gb to FreeBSD - but how? I am not too enthusiastic about reinstalling everything. I just updated to FBSD 4.7 and need to add space to install openofice. The easiest thing to do is probably to use some or all of the available 4Gb as a new filesystem mounted under /usr. For instance, /usr/local might be a good choice. You need to copy the current contents of /usr/local onto the new partition, move the old /usr/local aside somewhere and mount the new one in it's place: Assuming the disk partition where you have space is /dev/da2s2 something like the following (in single user mode): mount -a fdisk -i da2[ Mark slice 2 as belonging to FreeBSD ] disklabel -e da2s2 [ Create a 4.2BSD partition /dev/da2s2e, say ] newfs /dev/da2s2e mkdir /usr/local.new mount -t ufs /dev/da2s2e /usr/local.new rsync -avx /usr/local/ /usr/local.new/ [ rsync(1) is only one way to copy the whole directory tree over. Obviously, you need to install ports/net/rsync before dropping to single user... Another alternative might be: cd /usr/local ; tar -cf - . | ( cd /usr/local.new ; tar -xvpf - ) or there are similar methods using find+cpio, dump+restore etc.] umount /usr/local.new mv /usr/local /usr/local.old mkdir /usr/local mount -t ufs /dev/da2s2e /usr/local diff -ur /usr/local.old /usr/local [ make sure everything copied OK etc. ] vi /etc/fstab [ add /dev/da2s2e to standard mounts ] reboot Now, when the system comes back up multiuser you should have a separate /usr/local partition containing the same files as the original /usr/local directory. Once you're satisfied that everything has gone according to plan you can delete /usr/local.old and make merry in the extra space that becomes available. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
On Thu, Oct 24, 2002 at 04:28:24PM -0400, [EMAIL PROTECTED] wrote: At 09:05 PM 10/24/2002 +0100, you wrote: Either that or be careful to always set the EDITOR environment variable. In single user you'll probably also need to: TERM=cons25 ; export TERM for most full screen editors. Hmmm... question: My screen is set to cons50 with green on black While we're at it, I'm a little klost on the setting of environment variables. So far in several years of putzin about with FBSD, I have never had to actually set the variables. All has always worked well by default. So, how would I go about setting the environment variables, especially in single user mode? Do I shutdown now and at the prompt enter TERM=cons50 ? And when I go into single user mode, I have been setting the shell to /usr/local/sbin/bash - does it really make any difference if I use that or should I just go with the default csh? In single user mode, what you get is very bare bones. A lot of stuff like enviroment variables that would normally get setup for you won't have been. Your modifications to the console video settings won't have happened by that point in the boot sequence either. You'll get standard 25 rows, 80 columns, white text on black. When you boot into single user mode, you should just hit return at the prompt and take the default shell. What you'll get is actually /bin/sh --- remember at that time only the root partition is mounted, so the only programs you'll definitely have available to run are the statically linked ones from /bin and /sbin. It's only after you've done a 'mount -a', that you should be able to run pretty much anything installed on the system. To set an environment variable in /bin/sh, the syntax is exactly as I wrote above: TERM=cons25 sets TERM as an ordinary variable (only visible from the current process), and export TERM promotes it to an environment variable (visible from all descendant processes of the current one). Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
At 11:07 PM 10/24/2002 +0100, you wrote: In single user mode, what you get is very bare bones. A lot of stuff like enviroment variables that would normally get setup for you won't have been. Your modifications to the console video settings won't have happened by that point in the boot sequence either. You'll get standard 25 rows, 80 columns, white text on black. H that's not what I got - it was definitely green on black and I'm pretty sure it was 50 rows - it would have been pretty shocking to me if it were not, so I am quite sure of this. I went into single user as advised in the manual: shutdown now. But then I used bash... :(( When you boot into single user mode, you should just hit return at the prompt and take the default shell. What you'll get is actually /bin/sh --- remember at that time only the root partition is mounted, so the only programs you'll definitely have available to run are the statically linked ones from /bin and /sbin. It's only after you've done a 'mount -a', that you should be able to run pretty much anything installed on the system. To set an environment variable in /bin/sh, the syntax is exactly as I wrote above: TERM=cons25 sets TERM as an ordinary variable (only visible from the current process), and export TERM promotes it to an environment variable (visible from all descendant processes of the current one). Thanks for your patience. This really clears the fog-in-the-brain... :)) PJ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: how to add space
On Thu, Oct 24, 2002 at 06:21:25PM -0400, [EMAIL PROTECTED] wrote: At 11:07 PM 10/24/2002 +0100, you wrote: In single user mode, what you get is very bare bones. A lot of stuff like enviroment variables that would normally get setup for you won't have been. Your modifications to the console video settings won't have happened by that point in the boot sequence either. You'll get standard 25 rows, 80 columns, white text on black. H that's not what I got - it was definitely green on black and I'm pretty sure it was 50 rows - it would have been pretty shocking to me if it were not, so I am quite sure of this. I went into single user as advised in the manual: shutdown now. But then I used bash... :(( That's the difference between 'shutdown now' or doing what I was thinking of, which is to reboot, hit the any key during the ten second count down and issue 'boot -s' at the boot manager prompt. Years of updating machines to the latest -STABLE has engrained that into my head as *the* way to get to single-user mode, but you're right: 'shutdown now' works too. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message