Subject: Re: How to keep netbsd upgrading from deleting /home?
To: Brian Stark <bstark@pacbell.net>
From: Sung N. Cho <sncho@yahoo.com>
List: netbsd-help
Date: 11/21/2001 04:43:31
--- Brian Stark <bstark@pacbell.net> wrote:
> On Tue, 20 Nov 2001, Sung N. Cho wrote:
> 
> > How do I keep netbsd upgrade from deleting my home
> > directory?  These are my partitions:
> 
> Hello,
> 
> Booting from an install disk and installing the
> software will overwrite
> your files (not what you want). Here is what I
> typically do:
> 
>   * Create backup of system.
>   * Get latest compressed archive files from
> ftp.netbsd.org and place
>     them on one of my file systems, usually under
> /usr/local/incoming.
>   * Remove contents of /usr/src
>   * Uncompress and extract source code files so they
> end up in /usr/src.
>   * Rename existing kernel, like: 'cp /netbsd
> /netbsd.old'
>   * Uncompress and extract new kernel to /netbsd.
>   * Reboot.
>   * Remove contents of /usr/include, /usr/share/man.
>   * Create backup of /etc, like: 'mkdir /etc.old; cp
> -Rp /etc/* /etc.old/'
>   * Uncompress and extract NetBSD binary file sets.
>   * Manually merge changes from /etc.old to /etc.
>   * Reboot.
> 
> > primary partition 1: windows
> > primary partition 2: netbsd
> >
> > and within netbsd partition, I have:
> >
> > /
> > /swap
> > /var
> > /usr
> > /home
> >
> > Now the problem is, everytime I reinstall netbsd,
> I'm
> > forced to repartition those under netbsd;
> therefore
> > losing everything in /home.  Anyway I can preserve
> > /home during netbsd install?
> 
> Not like that, but you are thinking along the right
> track... For the
> i386 port, the boot disk has a master boot record
> that allows up to
> four different operating systems to be installed.
> Note that I said
> 'different'. If you had a second disk in your
> computer, and had
> NetBSD installed on one of those four partitions on
> the second disk,
> then you could create your /home file system on the
> second disk.
> 
> > Also, how do I mount the windows partition in
> netbsd?
> 
> It is pretty easy. My system has Windows ME and
> NetBSD 1.5Y. NetBSD allows
> you to (currently) specify up to 8 partitions. You
> need to use one of
> those partitions to mount a Windows/MS-DOS file
> system. Here is an excerpt
> from "disklabel -r wd0" on my system:
> 
> 8 partitions:
> #        size    offset     fstype  [fsize bsize
> cpg/sgs]
>  a:    100000  12288000     4.2BSD   1024  8192   
> 16   # (Cyl. 12190*- 12289*)
>  b:    256000  12388000       swap                  
>    # (Cyl. 12289*- 12543*)
>  c:   4146494  12288000     unused      0     0     
>    # (Cyl. 12190*- 16304*)
>  d:  87930864         0     unused      0     0     
>    # (Cyl.    0 - 87232)
>  e:    100000  12644000     4.2BSD   1024  8192   
> 16   # (Cyl. 12543*- 12642*)
>  f:    150000  12744000     4.2BSD   1024  8192   
> 16   # (Cyl. 12642*- 12791*)
>  g:   3540494  12894000     4.2BSD   1024  8192   
> 16   # (Cyl. 12791*- 16304*)
>  h:  12287937        63      MSDOS                  
>    # (Cyl.    0*- 12190*)
> 
> Please note that some of the partitions are reserved
> -- 'a' is typically
> the root file system, 'b' is for swap space, 'c' is
> the NetBSD portion of
> your disk, and 'd' is the entire disk.
> 
> If you didn't specify a parition for Windows/MS-DOS
> when you installed
> NetBSD, don't worry, you can use disklabel to edit
> the disklabel to add
> the partition, assuming that one is available. See
> the man page for
> disklabel on how to do this.
> 
> Once you have the NetBSD paritition tables setup
> correctly, you need to
> add an entry to /etc/fstab. Here is an excerpt from
> mine:
> 
> /dev/wd0a / ffs rw 1 1
> /dev/wd0b none swap sw 0 0
> /dev/wd0b /tmp mfs rw,-s=128000 0 0
> /dev/wd0e /var ffs rw 1 2
> /dev/wd0f /users ffs rw 1 2
> /dev/wd0g /usr ffs rw 1 2
> /dev/wd0h /winme msdos rw,noauto 0 0
> /kern /kern kernfs rw
> /dev/wd1b /winme2 msdos rw,noauto 0 0
> /dev/wd1g /usr/pkgsrc.work ffs rw 1 2
> /dev/wd2h /usr/local ffs rw 1 2
> /dev/cd0a /cdrom cd9660 ro,noauto 0 0
> 
> If your machine has lots of memory (like 128MB), you
> can use the trick
> I use to create /tmp in a memory-based file system.
> That is why I have
> two entries that refer to /dev/wd0b.
> 
> The above example shows two Windows/MS-DOS file
> systems. They are mounted
> on /winme and /winme2. That also means that in order
> to mount them, you
> will want to create the mount point, which is simply
> an empty directory.
> Running "mkdir /winme /winme2" as root will do this.
> See 'man fstab' for
> more information on the /etc/fstab file.
> 
> I don't use my Windows file systems that often from
> within NetBSD, so that
> is why I am using the 'noauto' option. To mount my
> partitions, as root
> I simply run "mount /winme; mount /winme2".
> 
> Good luck!
> 
> Brian Stark
> bpstark@pacbell.net
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1