ex post facto partition rearrangement


right now i decided to install wine

http://www.freshports.org/emulators/wine/

however.. i am concerned about my 67% utilization


Path: /usr/ports/sysutils/pciutils                                              
(root@www) 114> df
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s1a  11890858 7360326 3579264    67%    /
devfs               1       1       0   100%    /dev
/dev/ad0s2a   9907722 1734746 7380360    19%    /stable
Path: /usr/ports/sysutils/pciutils                                              (root@www) 115>

also.. i am feeling concerned about my "/" only subpartition configuration  i am scared to grow
my partition.. umm.. sysinstall doesn't exactly give me confidence.. if i select a partition i guess
it lets me edit the size.. but it is a free edit box i can make it bigger or smaller

maybe this is in grog's book

oh.. i fergot.. you can see above ad0 has at least two partitions of 11GB and 9GB.. the actual
disk is 60GB
kayveyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kayveyAuthor Commented:
to try to clarif myself.. say you are supposed to have a small root partition.. this stops crash..
statistically, it seems to me.. that my dual boot freeBSD might help a lot with that.. but maybe not
maybe i should have small root subpartitions on each..

well.. i guess i am not that far off grog's recommendations.. 4-6GB root plus /home

i dunnno

maybe i should have a /usr  grog doesn't thinkso

i dunno..

i _am_ feeling like growing my freeBSD 6.0 partition though
gheistCommented:
Best if you separate at least /var /tmp /usr and /, as automatic partitioner does, BUT make / /var and /tmp 1G or so in size, so they do not become too small, and be sure to keep automatically set swap partition
/home is link to /usr/home , if you have more users than you, you may want to use separete partition, but i assume it is yet not the case.

Only reason to split is that / suffers badly from soft dependency option, which in turn makes fsck always succeed, but at the price that some changed files may be lost over reboot ( not very suitable for filesystem with bootup config files)

In addition starting from FreeBSD 5 /dev is configured automatically, so you do not have to worry about it

Yet another reason is that you can set mount options for example that /tmp or mail spool or some chroot directory cannot contain suid programs, which evil hacker can abuse to hack your system. I think OpenBSD does set this for quite some time, and not for no reasons.
gheistCommented:
You cannot resize partitions without heavy disk editing and archiving/restoring filesystem contents. Some commercial unixes do allow this, sometimes with help of Veritas filesystem software.
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

kayveyAuthor Commented:
is /tmp for swap?  because i have a whole other partition (not subpartition ) ad0s3 for that

i was told i could "grow" partitions relatively easily.   unless you are going to tell me i should really
revert to 5.4 on a full time basis becuase that is the only way i can see my SD card then i think i want to grow my
ad0s1 partition now.
David PiniellaCommented:
/tmp and swap are different. tmp is for temporary storage -- programs might need to put stuff there (lockfiles etc) -- and swap is for paging to disk when RAM is full. If you have multiple disks, and your server is doing a lot of disk writes/filling up RAM, it often makes sense to put a seperate swap partition on each disk
kayveyAuthor Commented:
i made an extra partition and it is shared between my two bootable partitions.. i thought that
was sorta efficient but the reason i did it is sort of related to my question here..  i was afraid to
mess with my exsisting operational partitions so i made  a new one.. it werks fine..

anyhoo.. i think i am feeling okay about my subpartitions but can someone please tell me
how to grow my partition?
gheistCommented:
6.x is too extreme for now.
5.4 may not change matters for your SD cards probably, but at least everything else will work as expected.

Growing partitions id very complicated matter, command for this is growfs, but you have to add extra space after end of partition, easy only under vinum , which in turn is not very stable yet.
David PiniellaCommented:
in the end i think you're better off backing up what you want and reinstalling/repartitioning. in any case you want to backup, cos growing the partition can mung up your data.
kayveyAuthor Commented:
rudy did all the installing and he is gone his dog died today
kayveyAuthor Commented:
./install.sfx.3771: 1: Syntax error: "(" unexpected
Done.
Path: /usr/ports/distfiles                                                      (root@www) 111> df
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s1a  11890858 7390370 3549220    68%    /
devfs               1       1       0   100%    /dev
/dev/ad0s2a   9907722 1737632 7377474    19%    /stable
Path: /usr/ports/distfiles                                                      (root@www) 112>


i guess i am okay for now
gheistCommented:
> ./install.sfx.3771: 1: Syntax error: "(" unexpected
You probablt need linux emulator loaded
1) kldload linux
2) add linux=YES to /etc/rc.conf
kayveyAuthor Commented:
linux_enable="YES"

is already in there

# -- sysinstall generated deltas -- # Sun Jun 26 16:53:15 2005
# Created: Sun Jun 26 16:53:15 2005
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
linux_enable="YES"
linux="YES"
moused_enable="NO"
sshd_enable="YES"
usbd_enable="YES"

kayvetop# kldload linux
kldload: can't load linux: File exists
kayvetop#

i am on 5.4 right now.. since both my 5.4 and 6.0 see each other's partitions.. could i grow
the 6.0 partion while logged onto the 5.4?  would that be an easy way to do it?

kldload: can't load linux: File exists
kayvetop# cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s2a             /               ufs     rw              1       1
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
/dev/ad0s3b             none            swap    sw              0       0
/dev/ad0s1a             /mnt-for-6.x            ufs     rw              2       2
kayvetop#

see i have a mount for 6.0 in my 5.4 boot files..

kayvetop# cd /mnt-for-6.x
kayvetop# pwd
ls/mnt-for-6.x
kayvetop# ls
.cshrc          boot            entropy         proc            sys
.profile        camera          etc             rescue          tmp
.snap           cdrom           home            root            usr
C:              compat          lib             sbin            var
COPYRIGHT       dev             libexec         stable
bin             dist            mnt             stand
kayvetop# kayvetop# uname -a
FreeBSD kayvetop.monkeybrains.net 5.4-RC3 FreeBSD 5.4-RC3 #0: Sun Apr 17 09:23:46 UTC 2005     root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
kayvetop#
gheistCommented:
cd /usr/ports
rm -rf */*/work

to get more space - remove build directories
David PiniellaCommented:
cd /usr/ports && make clean && make distclean
will also clean up a lot of stuff.
gheistCommented:
no no no
too many forks

then
# rm -rf /usr/ports/distfiles/*
instead of distclean...
gheistCommented:
rm -rf /usr/obj/*
kayveyAuthor Commented:
i don't think i want to do this:

 rm -rf /usr/ports/distfiles/*

there are java files in there i can't find on the internet any more.. still need to get java going
kayveyAuthor Commented:
also.. i don't like the sound of this solution.. i have a freekin 60GB HD i want to start using more real estate
kayveyAuthor Commented:
wooptie do make clean has been running for an hour and i am at 70% utilization instead of 71%

i have more real estate here can somebody walk me thru growing my file system? what about growing
one filesystem's root by booting from the other?  shouldn't that be a good way of growfs without
having to backup and reinstall?  i seriously am not comfortable with reinstalling my OS.  i never installed
them in the first place.  

  again:       one HD  60GB  4 partitions plus unused real estate

      -11GB bootable / for freeBSD 6.0 mounted on /mnt-for-6.x when booting from freeBSD 5.4 70% utilized as seen by df command
      - 9 GB bootable / for freeBSD 5.4 mounted on /stable when booting from freeBSD 6.0  20% utilized as seen by df command
      - 1GB   swap space used by both of the above bootable partitions
      - 10GB MSDOS partition that i marked bootable but haven't successfully installed MS on
      -   whatever's left from 60GB is completely unused i guess around 22GB
David PiniellaCommented:
save your java files somewhere temporarily; your home dir or a new dir that you make jsut for that and then do a make distclean in /usr/ports. yes, it takes a while. incidentally, installing MS anything will likely overwrite your MBR. I suppose you could make your extra 22 gigs a data mount (format it, mkfs a UFS slice on it and then mount it as /storage or /data or something. Then both FreeBSD installs can use it. (MS won't read it, I think, but I'm not sure...it'd surprise me if any DOS or Windows flavor had UFS support.)
kayveyAuthor Commented:
i already thought of a "data mount" but i didn't like the idea because it is looking
like i might need more space to install more programs

::sigh::

okay rtfm growfs
kayveyAuthor Commented:
i have to say.. make clean in /usr/port was some freeking irritating advice, i am sorry to say..

it has been running for hours and it has freed up a couple hundred megs, tops..

::sigh::

i guess i wanted the freeking inodes anyway.

i can growfs, but i have to do it logged onto freeBSD 5.4  just umount /mnt-for-6.x

*@&#  i should delete this question
kayveyAuthor Commented:
can't i?

i am tellign them to delte this quesiton now.. how do i do that?
kayveyAuthor Commented:
maybe you freget.. i have one freeking partition.. that's it.. all on root.. doesn't that make it simple?
kayveyAuthor Commented:
i have no subpartitions.. only partitions

ad0s1(a-h i dont' care  all one thing)
ad0s2(one partition)
ad0s3( swap partition)

but wait.. maybe th

(root@www) 113> ls /dev
       
ad0            
ad0s1          
ad0s1a       <---- the only used subpartition for freeBSD 6.0  
ad0s1c          
ad0s2          
ad0s2a       <---- the only used subpartition for freeBSD 5.4  
ad0s2c          
ad0s3          
ad0s3b      <---- swap partition shared between both bootable freeBSD's    
ad0s3c          

                                                             
(root@www) 115> df /dev/ad0s1a
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s1a  11890858 7699000 3240590    70%    /
Path: /home/kayve                                                              
(root@www) 116> df /dev/ad0s1c
df: /dev/ad0s1c: Operation not permitted
Path: /home/kayve                                                              
(root@www) 117> df /dev/ad0s1
df: /dev/ad0s1: Operation not permitted
Path: /home/kayve                                                              
(root@www) 118> df /dev/ad0s1a
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s1a  11890858 7699000 3240590    70%    /
Path: /home/kayve                                                              
(root@www) 119> df /dev/ad0s1c
df: /dev/ad0s1c: Operation not permitted
Path: /home/kayve                                                              
(root@www) 120> df /dev/ad0s2
df: /dev/ad0s2: Operation not permitted
Path: /home/kayve                                                              
(root@www) 121> df /dev/ad0s2a
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s2a   9907722 1781290 7333816    20%    /stable
Path: /home/kayve                                                              
(root@www) 122>
Path: /home/kayve                                                              
(root@www) 122> df /dev/ad0s3b
df: /dev/ad0s3b: Operation not permitted
Path: /home/kayve                                                               (root@www) 123>


i can't growfs on a mounted filesystem, so i can only grow the root partition for the version i am not running.
therefore, if i boot onto freeBSD 5.4 i can umount the ad0s1a partition (or is it ad0s1?..

EXAMPLES
         bsdlabel da0s1

     Display the label for the first slice of the da0 disk, as obtained via
     /dev/da0s1.

         bsdlabel da0s1 > savedlabel

     Save the in-core label for da0s1 into the file savedlabel.  This file can
     be used with the -R option to restore the label at a later date.

         bsdlabel -w /dev/da0s1

     Create a label for da0s1.

         bsdlabel -e da0s1

     Read the label for da0s1, edit it, and install the result.

         bsdlabel -e -n da0s1

     Read the on-disk label for da0s1, edit it, and display what the new label
     would be (in sectors).  It does not install the new label either in-core
     or on-disk.

first i have to bsdlabel ad0s1, then i growfs it.. only if i am booted up on freeBSD 5.4  because the OS can't be umounted..

is that the complication yer talking about?

answer yes or no and get the points.
kayveyAuthor Commented:
btw the skewl guy came i didn't realize who he was in the real werld.. that kid who was a flash wiz.. arrr..

but he hasn't run freeBSD ..

he told me that the XP's he has are very well behaved.. i should be able to install them on my partition..

i was supposed to try to install my win2K today but *#&@ it.  prolly won't see the SD card reader anyway..
XP is better at that i think.

i am still hoping cvsup on the 6.0 will see the SD card in another month.
gheistCommented:
http://acpi.sourceforge.net/dsdt/view.php?manufacturer=ASUS
go here get working ACPI table, or learn how to get system running without ACPI.
I doubt you have win2K licence from your friend Bill.
kayveyAuthor Commented:
uncle bill can kiss my *@&#*
kayveyAuthor Commented:
oh fer.. how do i find out my "mainboard?"
kayveyAuthor Commented:
what exactly does the ACPI have to do with this question?
kayveyAuthor Commented:
okay freek tha deak..

 i guess i get it  just answer myquestion.....

here is my disk right now:


    ---------------------------------------------------  0
      MBR (must be first)
    ---------------------------------------------------   63
      ad0s1                        
      freeBSD 6.0


    ----------------------------------------------------- 11GB
       ad0s2
      freeBSD 5.4

    ------------------------------------------------------- 21GB
       ad0s3
      freeBSD swap nonbootable
   --------------------------------------------------------- 22GB
       ad0s4  MSFAT not installed

   ----------------------------------------------------------- 32GB

       unused
   -------------------------------------------------------------60GB


so if i try to growfs it has to be unfragmented?  is that the deal? i can't add space from 32GB+ to ad0s1 because a slice can only be a
continuous piece?  

therefore.. to accomplish this.. i would first need to create a new slice ad0s5 maybe, and copy all of ad0s2 to that.. if i just copy it all,
will it be installed?   how do i do this?  can you walk me thru this?

i don't know everything rudy did, i don't want to have to retrace his steps by asking you guys, it is way too slow.  i am spending all
day ditzing around with this the summer is getting old, i have an incomplete software engineering project to finish, and i have
to have mico running on this damn thing.

here is what i started to do after logging onto freeBSD5.4 as root, not kayve, so that my home directory is /root not /mnt-for-6.x/usr/home/kayve
# $FreeBSD: src/sys/i386/conf/GENERIC.hints,v 1.13 2004/04/01 21:48:31 alfred Ex
p $
hint.fdc.0.at="isa"
hint.fdc.0.port="0x3F0"
hint.fdc.0.irq="6"
hint.fdc.0.drq="2"
hint.fd.0.at="fdc0"
hint.fd.0.drive="0"
hint.fd.1.at="fdc0"
hint.fd.1.drive="1"
hint.ata.0.at="isa"
hint.ata.0.port="0x1F0"
hint.ata.0.irq="14"
hint.ata.1.at="isa"
hint.ata.1.port="0x170"
hint.ata.1.irq="15"
hint.adv.0.at="isa"
hint.adv.0.disabled="1"
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: 34563322        0    4.2BSD        0     0     0
  c: 34563322        0    unused        0     0         # "raw" part, don't edit
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
/tmp/EdDk.Hoe0fH5ehs: 5 lines, 221 characters.
partition a: partition extends past end of unit
partition c: partition extends past end of unit
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system utilit
ies
re-edit the label? [y]:


okay i guess i will say "n" until somebody tells me more.
kayveyAuthor Commented:
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 24563322 (11993 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 6/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 24563385, size 20466810 (9993 Meg), flag 80 (active)
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 12/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 45030195, size 2104515 (1027 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 9/ sector 63
The data for partition 4 is:
sysid 6 (0x06),(Primary 'big' DOS (>= 32MB))
    start 47134710, size 23053275 (11256 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 14/ sector 63
kayvetop#
gheistCommented:
The problem is that standard tools do not support resizing partitions.
What you ask can only be accomplished with careful disk editing.
kayveyAuthor Commented:
then walk me through it.. okay tell me know i absolutely have to reinstall freeBSD?

you think 6.0 will be stable by the end of the summer? i really just need to accomplish this
"pong" project next semester and if 6.0 gets stable enough i could just wipe out the
5.4 partion and append it to 6.0.. that would be easy, no?

what about the idea of spagetti filesystem?  that occurred to me, and i think it is very unix-like..

the thing is.. i guess i would have to reinstall stuff.. i need to analyze where all the disk
space is being used.. like i could create ad0s5 and use it for a /usr mount or something..
but then i would need to reinstall everything on /usr?

i really wish you would be more specific here "careful disk edition" does not really
tell me *@& about how to proceed from here.

the suggest of "/data" mount is clearly not very helpful.. i have filled up major amounts
of space just installing things.  for additional disk space to be useful, it has to fit
my needs.. fine i need to analyze the needs.. right now it looks like /usr
kayveyAuthor Commented:
also stop saying "resizing" i am trying to "enlarge" it seems  a werld of difference to append somehow.
kayveyAuthor Commented:

indeed..

kayvetop# df -m /mnt-for-6.x/
Filesystem  1M-blocks Used Avail Capacity  Mounted on
/dev/ad0s1a     11612 7493  3189    70%    /mnt-for-6.x
kayvetop# du -m /mnt-for-6.x//usr | sort -nr > du.usr6.out
kayvetop# head du.usr6.out
7295    /mnt-for-6.x//usr
5074    /mnt-for-6.x//usr/ports
1217    /mnt-for-6.x//usr/ports/x11-servers
1022    /mnt-for-6.x//usr/ports/x11-fonts
987     /mnt-for-6.x//usr/ports/distfiles
920     /mnt-for-6.x//usr/home
909     /mnt-for-6.x//usr/home/kayve
818     /mnt-for-6.x//usr/home/kayve/src
745     /mnt-for-6.x//usr/ports/editors
739     /mnt-for-6.x//usr/ports/editors/openoffice-1.1/work
kayvetop#

clearly, my main problem is /usr/ports

umm.. a problem might be that i have installed .. let's see.. x11..

so.. umm.. what i feel like would be this:

create ad0s5

mount it on /usr/ports

now.. how to not step on the existing installed /usr/ports?   could i somehow create
links to make sure the existing stuff..

i suppose ad0s5 would have to be mounted something like /usr/ports2

then i could make links (is this symlinks or hard links?) from everywhere in /usr/ports  to /usr/ports2  for any
ports i install from now on so they would be loaded in /usr/ports2 but i would have a link from /usr/ports
to /usr/ports2 so they would install correctly?

if you could, please elaborate _specifically_ rather than these useless general statements that reak of
"its too complicated for you to understand just give up and throw the *@#& puter out the window"
David PiniellaCommented:
it is impossible to just "append" the empty space to an already-created partition; this is why gheist keeps referring to what you want to do as "resizing" -- there's no other way for you to do this.
kayveyAuthor Commented:
what the hell is "growfs" then?  you guys keep giving nonanswers that are not very informative.

what about making hardlinks (or symlinks.. sheesh.. how clear a question is that and no answer?)
to a new filesystem mounted on "/usr/ports2"

obviously building a bunch of ports is what is eating up my disk space and it seems to me
mounting another partion on "/data" is not going to solve that because things need to
be found in the $PATH and fine you adjust it but it is hullaballoo when it is a gigantic
make install with all its approved $PATHs

i'm really getting irritated with this.  i am sick of hearing an answer like "its complicated"  so be
clear and enumerate the complications in a definitive matter.
gheistCommented:
If you have no valuable data on your disk - burn 5.4  cd form iso image and boot it, rest is pretty straightforward...
kayveyAuthor Commented:
okay.. now let me try to paraphrase what you just said.. please correct me if i am wrong...

1) make a "mirror" (namely an "iso image?" .. i will have to google that to understand the steps)
     i.e. a "copy" (i don't really know the difference between a "copy" and a "mirror" other than
      a "mirror" seems to me to be a copy of something that is posted on an FTP site  in case one
      site is down, ppl can download from the other..   )

2)  the "iso image" is something i end up burning on a cd (good.. this will be an impetus for me to
     learn to burn cd's in freeBSD.. that's covered in my book.. i have confidence that will go
     smoothly, but if it doesn't, it will be a good use of my time because in arizona i will definitely
     be able to use this method of data transfer to remain connected to this place and the professor
     who i am supposed to be learning to program middleware from)

3)   now i will have a bootable CD that will have everything installed from my stable freeBSD 5.4
     version. i will be able to obliterate my ad0s2 partition and let my ad0s1 partition eat it up..
     thereby nearly doubling the size of my ad0s1 partition.. does this mean that ad0s3 will still
     be there and i will have a 13th floor phenomenon missing ad0s2 partition?

4) i will want to recreate the freeBSD 5.4 filesystem on a new partition, ad0s5. i know i am going to
    want to do this based on what i know right now, because i have a knoppix bootable CD and i was
    not impressed trying to run an OS from a CD.. data transfer i am pretty sure (not becuase i looked
    up specs, because i experienced the sluggish feel) of CD is far inferior to HD data transfer.

  now.. a possible hitch (or not).. there are links from  my freeBSD 5.4 to freeBSD 6.0  i guess i feel
  okay about that becuase if i am killing 5.4 i won't be killing my home directory, which resides
  on freeBSD 6.0 (a.k.a.  /mnt-for-6.x/usr/home/kayve when running freeBSD 5.4)   will these links
   still werk when i copy the freeBSD 5.4 back to the new partition ad0s5?  


   so this "iso image" thing.. does it mean i don't have to reinstall everything?
David PiniellaCommented:
I understood gheist's suggestion to be that you reinstall from a 5.4 disk that you burn yourself from an ISO image. "rest is pretty straightforward" == repartitioning is easy when you're reinstalling. to do what you just posted (making an ISO of your currently installed system) is not hard, but it's unlikely that it'd fit on a CD and you certainly couldn't boot from it without some serious reconfiguring (RAM disks and loopback filesystems and the like...)

hardlinks will not work with different filesystems/partitions -- a hardlinked file has to share the inode of the "parent" file, so this is not possible.

if a total re-install is completely impossible for you, I can suggest one more work around, although I honestly don't know how good it'd work for you:

.  make a new disk, format, partition, label, etc
.  make it your /usr/ports2 partition or whatever
.  change your cvsup configs to point all your source to be downloaded there instead of /usr
.  cvsup your ports collection and it should show up there.

I don't recommend that you do that because you can potentially mess up your INDEX and pkg db In Fairly Serious Ways.

You might also consider checking this article out: http://hacks.oreilly.com/pub/h/1491

growfs is complex and few questions about how to deal with it readily present "yes/no" answers. You probably didn't want to hear that, but that's the way it is. See http://ezine.daemonnews.org/200111/growfs.html for some tips on how to use it. (to condense: the empty space needs to be right after the partition you're growing, you'll want to reboot into single-user, remember there's no man pages in single-user mode so print out what you think you'll need, you'll need to label it before you grow it, etc.)
David PiniellaCommented:
also, look at the last section in this article: http://www.freebsdwiki.net/index.php/Partitioning_Tips_and_Tricks -- the default FreeBSD install does something similar with /home and /usr/home -- /home is really a link, do a ls -lad against /home sometime to see  it.
kayveyAuthor Commented:
it's not straightfoward because i have x and other things rudy did including the netwerk configuration that werks.  the only
way i get a wire is what rudy did.

i would need a DVD to put the 2GB i have on freeBSD 5.4  obviously it is not trivial to "reinstall" not for me.
obviously there is a lot that has been done to have more than doubled what was once on a CD.. maybe it was
largely extraction.
i hate installations.  i am having a hell of a time getting java installed.  i don't want to @*#& things up rudy
is gone and it took us 2 weeks to get me to where i am.. i can't afford the downtime i have to make sure i
have something up and running for my mico project starting in september.

what i don't want to hear _AGAIN_ is ".. growfs is too complex for you never mind.." what i want to hear is
how to proceed.  fine.. i will look at that specific link.. that is obviously a vast improvement over what has been
told to me before.
kayveyAuthor Commented:
okay was this what you were talking about?

Use soft links to your advantage!

Don't forget that you can use ln to do really nifty things with your drives and partitions. For example if you've taken the first tip's advice and made a relatively small /usr partition and a very large /data partition, you might want to move the ports tree - which can occupy several gigs of space if you build lots of ports and aren't meticulous about cleaning out old distfiles and work directories - into the larger /data partition. But instead of trying to laboriously fix the entire system so that it looks in /data/ports instead of /usr/ports, what you can do instead is mv /usr/ports /data/ and then ln -s /data/ports /usr/ports - now it looks and works as though the ports tree is still in the default location, but in fact it's operating from the bigger partition!

can i now create ad0s5 and make it /data and mount it and do this procedure and everything will werk right?
jrssystemsnetCommented:
Okay, you've got a lot of work ahead of you to get all this sorted out.  But it's doable.  Here is what you should do.

First, /stand/sysinstall --> config --> fdisk.  Create a new partition, 10G in size.  Mount it as "tempdisk".

Second, boot from the 5.4 install CD and select "Fixit mode".  From the command prompt:

# chroot /dist
# mount_devfs devfs /dev
# mkdir /mnt/olddisk
# mkdir /mnt/newdisk

Now we're ready to move your data from your old OS install to this new partition for temporary storage so that we'll be able to clean up your partitioning issues without losing your configurations.  NOTE: we are assuming here that your original "/" was mounted at /dev/ad0s1, and your "new /tempdisk" mounted at /dev/ad0s5 after you did your fdisking.  DOUBLE CHECK THIS!

# mount /dev/ad0s1 /mnt/olddisk
# mount /dev/ad0s5 /mnt/newdisk
# cp -Rpv /mnt/olddisk /mnt/newdisk

This will take a while - probably an hour or two, depending on the speed of your drive and system.  The "v" argument will let you watch filenames go blizzing by so you don't have to worry that your system might be locked up.  Once that's done, we're ready to actually start fixing things.  NOTE: WE WILL BE KEEPING ALL YOUR DAEMONS AND SERVERS AND CONFIGS.  So don't panic at this next step.

Boot from the 5.4 Install CD, and this time, tell it you want to install FreeBSD.  Pick standard installation.  Now this is the scary part, but remember, we saved all your data.  Delete your old ad0s1 partition.  If you don't want to dual boot anymore, delete ad0s2 as well.  Just DON'T delete ad0s5, or whatever your new partition wound up being that you just copied all your data to.  Once you've deleted ad0s1 and maybe ad0s2, select "A" to let FreeBSD automatically size your new ad0s1 to all the space remaining on the drive.  Then select "Q" to proceed to disklabeling.

It will ask you about boot managers.  If you kept ad0s2, select boot manager.  If you didn't keep ad0s2, select none.

Now in the disklabeling section, JUST HIT A.  It will automatically make slices for / /tmp /var /usr and swap, with designations like ad0s1a ad0s1b and so forth and so on.  DON'T GET FANCY HERE.  Just let it do the default.  Hit Q after you've hit A and made the slices.

Now it's ready to start installing.  Again, don't get fancy - what you do here actually doesn't even really matter much, so don't try to do anything funky.  Just pick default options and get through this cleanly, we're going to wipe out the actual OS installation with your old OS anyway.

Once you've booted into your new OS installation, drop to single user mode by typing init 1.  Now you're ready to get all your old data back.

# mount -rw /
# mount -rw /usr
# mount -rw /var
# mkdir /mnt/tempdisk

Again, we're assuming here that the full devicename of the partition you created for temporary storage and copied all your files to was /dev/ad0s5.

# mount -rw /dev/ad0s5 /mnt/tempdisk

Now we're ready to get all your old stuff back.  Some of these steps are likely to take a while.

# cp -Rpv /mnt/tempdisk/olddisk/etc /
# cp -Rpv /mnt/tempdisk/olddisk/var /

Those two probably didn't take too long.  This one's going to be the pokey one.

# cp -Rpv /mnt/tempdisk/olddisk/usr/local /usr

Once that's done, you're ready to reboot again, and now you'll have a normal partitioning arrangement, but everything will be as it was when you left it.  shutdown -r now, and check.  If anything's still not working right, that would be because Rudy did something weird with install locations, and you may need to drop back to single user mode and cp -Rpv /mnt/tempdisk/olddisk/usr / ... but DON'T do that unless you absolutely have to, you'll end up reverting to some things you don't want to from your old installation (assuming it's pre-5.4) if you do.

Once you've satisfied yourself that everything is working fine, go back into /stand/sysinstall and fdisk and delete the ad0s5 temporary partition, and create a new partition that's the size of the entire remainder of the hard drive.  Don't mess with the boot loader (leave untouched).  In Disklabel, create a single slice to use the entire partition, and mount it as "data".

Finally, you have a relatively normal configuration - fairly reasonably sized /, /usr, /var, /tmp partitions with all your old stuff but in all the right places, and the rest of your drive accessible as /data.

Good luck.
jrssystemsnetCommented:
OK, on looking back at your df output in THIS thread, it looks like you are mounting stuff as /dev/ad0s1a, not just /dev/ad0s1.  In which case, that's how you should be referring to it in any of the stuff in my above instructions.

Always compare carefully with what you really see in your own mount table.

Again, good luck.
kayveyAuthor Commented:
hmm.. i thought they deleted this good one

haven't been able to try to follow yer directions yet.  i am posting to make sure this doesn't get deleted.
kayveyAuthor Commented:
i think i am changing my mind about the rm solutions..

but will it compromise new builds?  hmm.. i better not do it while simultaneously building
k3b but otherwise i guess it would be okay..

but.. i am confused about the argument between gheist and dpienieella
Comment from gheist
Date: 07/14/2005 12:16PM PDT
      Comment       Accept

cd /usr/ports
rm -rf */*/work

to get more space - remove build directories

Comment from dpiniella
Date: 07/14/2005 12:22PM PDT
      Comment       Accept

cd /usr/ports && make clean && make distclean
will also clean up a lot of stuff.

Comment from gheist
Date: 07/14/2005 12:43PM PDT
      Comment       Accept

no no no
too many forks

then
# rm -rf /usr/ports/distfiles/*
instead of distclean...

Comment from gheist
Date: 07/14/2005 12:49PM PDT
      Comment       Accept

rm -rf /usr/obj/*

okay.. my take is that i should:


1) cd /usr/ports
2) rm -rf */*/work
3) make clean
4)  rm -rf distfiles/*

but right now i am making k3b in /usr/ports/sysutils..

umm.. is that included in */*/work?
it doesn't seem i better make clean in /usr/ports while that's running..

arg.. maybe not even the distfiles one
kayveyAuthor Commented:
http://acpi.sourceforge.net/dsdt/view.php?manufacturer=ASUS&name=M6827NEUP

i have no idea if this is the right laptop...

my books say "E1434-X" but that's not on the list..

i tried choosing that "M6.." because i thought my barebones was M6 something but
i think there was only one more alphanumeric digit after "M6" i.e. "M6X"
kayveyAuthor Commented:
this looks sort of promising but my guess i should reconcile it with dmesg somehow

http://acpi.sourceforge.net/dsdt/view.php?id=340

ASUS M6827NEUH
Last Modified       2005-08-28 04:30 by Gerry       S4 Bios       no
Original       no       SMP       no
Bios Revision       2.07       APIC Table       no
Board Revision             Boot Table       no
DSDT Vendor             C2 Latency       0
DSDT Product             C3 Latency       0
DSDT Revision       0       Dutywidth       0
Interpreter Fix       
Features       Bat state for BAT0 fixed
Supersedes       none       Superseded By       none
Download | Edit | Another DSDT
kayveyAuthor Commented:
okay.. a clarification for mr.  jrssystemsnet ..

yer amendment post notes the correct /dev/ad0s1a  thingy dingy..

i didn't really do that, it is some sort of freeBSD standard i don't know exactly why it happened, but
note that when i created the nonbootable swap on the third partition it became known
as /dev/ad0s3c  but that happened not based on me giving it such a designation but following
some directions that never had anything to do with naming the device explicitly (at least
that i observed) with  some comand that contained any strings such as "ad0s3c" or "ad0s1a" or whatever..

so now i am a little tripping about designationing /dev/ad0s5 as is, or perhaps
/dev/ad0s5c or /dev/ad0s5d or /dev/ad0s5a  or whatever..

any thoughts?

today i have designated time to perhaps explore new werlds on my HD, but meanwhile
my k3b dvd burner port make is still cooking....
kayveyAuthor Commented:
i am going to keep tri-booting for now (i have uncle bill on partition 4, which is sort of important for now
as i have been able to do a few things like access my SD drive.. umm.. i ferget there might have been a
few things.. but also get a dialup connection at home has been a big one.. )

i needed freeBSD 5.4 to mount the dvd drive.. umm.. i think i have java installed on 6.0, and also mico..
very soon i need to do my distributed project i will be in big big trouble if i can't accomplish that..

i really like my swap on partition 3.. at least as long as i have two freeBSD boots.. heh {:}  i will probably
keep it even if i do move to only one freeBSD boot just to be novel..

umm..

i can't think of why i really decided to post this message  {:P
kayveyAuthor Commented:
i just thought of one thing..

ad0s1a is freeBSD 6.0
ad0s2a is freeBSD 5.4

so maybe i should step on ad0s2a and reboot a freeBSD 5.4 there step on it substitute ad0s2a everywhere
where ad0s1a is?

yeah.. that feels right to me.
kayveyAuthor Commented:
i just realized the freeBSD 6.0 installation is the one that needs the memory..

therefore.. i need to use the freeBSD 6.0 disks to do all of this, don't i?

arr..  {:P

you are talking about /dev/ad0s1(a) and freeBSD 5.4 as if they are one and the same.

this is not correct...

/dev/ad0s1a is freeBSD 6.0 and is 80% utilized
/dev/ad0s2a is freeBSD 5.4 and is 32% utilized

i wish this danged make would finish
kayveyAuthor Commented:
you know what.. i am not happy with the whole jrssystem thing now again because i saw something
about linking /usr/ports to /data

i need a bigger /usr directory, and i haven't seen how /data will solve that.
gheistCommented:
About cleaning space - either way does, I simply posted quicker way.

For others having ideas for ACPI:

http://www.experts-exchange.com/Operating_Systems/FreeBSD/Q_21476740.html#14636915

                Manufacturer: ASUSTeK Computer Inc.        
                Product Name: M6Ne      
                Version: 1.0      
David PiniellaCommented:
I think that what gheist meant by "too many forks" is that doing a "make clean && make distclean" creates many child processes during the cleaning of the various ports and the "&&" adds another fork still...make clean and make distclean "politely" clean up your work dirs and his suggestion of rm'ing the distfiles dir will do almost the same thing in a faster (if less gentle) way. I have a pretty fast machine and don't mind doing a make distclean, but it DOES take time.

making a /data dir with lots of space and then making /usr a link to /data will effectively mean that /usr has a lot of space.
kayveyAuthor Commented:
what freeks me out is if i have a /usr already, then additionally do a command like
ln -s /usr /data (am i transposing? i don't know which path is real and which is
a link)  the thing that freeks me out is what if the directory
/usr actually exists in like the one partition..then i add the partition /data and now
/usr is supposed to point to /data but /usr is real.. a link is like an emphemeral
thing that doesn't really exist except pointing to something real... sort of like a
pointer in c:

int * p
p = malloc(4);

p doesn't exist, but the stuff malloced does..

now it seems to me if you have an actual /usr directory _and_ you want to make /usr
exist as a pointer to something else called /data, yer filesystem is not going to know
what you mean by /usr.. does it mean the real /usr, or does it mean /data

therefore.. i don't see wtf a thing called /data should exist.. the new partition
should just be all of /usr
kayveyAuthor Commented:
kayvetop# cd usr/ports
kayvetop# rm -rf */*/work
kayvetop# df
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s2a   9907722 3725608 5389498    41%    /
devfs               1       1       0   100%    /dev
/dev/ad0s4   11526637 7588697 3937940    66%    /ms_disk
/dev/ad0s1a  11890858 4477520 6462070    41%    /mnt-for-6.x
kayvetop#

oh wow  
kayveyAuthor Commented:
i still have disk real esate i am fond of getting.. ummm..
kayveyAuthor Commented:
i have a thought about those arguments about a tiny / to prevent crash..

doesn't dual boot freeBSD werk even better? if freeBSD 6.0 crashes, i can boot freeBSD 5.4 and vica
versa.   both OS's mount each others filesystems so i could retreive data

kayveyAuthor Commented:
the weird bit is that i do have three other users....

1) professor puder because he was in germany and i was going to have deallys doing the mico thing
during summer but now summer's over and he's back
2) rudy who set the mess up for me mostly.. he installed freeBSD 6.0 with xfce4 and stuff.. i installed
  freeBSD 5.4 with a disk he gave me but i was miffed on the netwerk stuff he fixed that and did
   xfce again for me and then made the links to home.. there is only one home both OS's point to it
3) my irish friend stephen who is not speaking to me anymore except he sent me an email
    a while back about some bad things that happen in northern ireland..  i still have a postponed
    email to him about the latest thing.. he was complaing about gay bashing in northern ireland
   ( he's actually an orangeman i guess) which we are all confused about because i didn't think
   he was gay or antyhing

oops.. he has read these forums in the past  {:}
kayveyAuthor Commented:
rudy logged in once when i was at his office.. i don't think dr. puder ever did, nor stephen
kayveyAuthor Commented:
did i just open a security hole for myself?  {:P
jrssystemsnetCommented:
for the love of god can you please either award points for this question (and the PDF reader one) or close them and request your points back?  I don't really need to get 20 mails of pointless comments in a day on these threads anymore.

I hate to be cranky, but this is ridiculous.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kayveyAuthor Commented:
the pdf reader is not werking
kayveyAuthor Commented:
okay you can have the points for this..
it's rediculuous that the problem is not solved.  
you gave some going points about doing a partition thingy.
i think you are leaking memory with redundant /usr and /data directories though.
kayveyAuthor Commented:
going = good

they were good points about how to reshuffle mypartitions..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.