Re: Loader, MBR and the boot process

2010-01-24 Thread Mark Andrews

In message cf9b1ee01001240759j2476cf3es2babd8b32a90f...@mail.gmail.com, Dan N
aumov writes:
 On Sun, Jan 24, 2010 at 5:29 PM, John j...@starfire.mn.org wrote:
  On Fri, Jan 22, 2010 at 07:02:53AM +0200, Dan Naumov wrote:
  On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov dan.nau...@gmail.com wrote=
 :
   On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com wro=
 te:
   On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:
  
   Hi,
  
   I recently found a nifty FreeBSD ZFS root installation script and
   been reworking it a bit to suit my needs better, including changing =
 it
   from GPT to MBR partitioning. However, I was stumped, even though I
   had done everything right (or so I thought), the system would get
   stuck at Loader and refuse to go anywhere. After trying over a dozen
  
   probably this line is the cause:
  
   dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s1a skip=3D1 seek=
 =3D1024
  
   Unless by swap first you meant the on-disk location, and not the
   partition letter. If swap is partition a, you're writing the loader
   into swapspace.
  
  
   Regards,
   Thomas
  
   At first you made me feel silly, but then I decided to double-check, I
   uncommented the swap line in the partitioning part again, ensured I
   was writing the bootloader to ${TARGETDISK}s1b and ran the script.
   Same problem, hangs at loader. Again, if I comment out the swap,
   giving the entire slice to ZFS and then write the bootloader to
   ${TARGETDISK}s1a, run the script, everything works.
 
  I have also just tested creating 2 slices, like this:
 
  gpart create -s mbr ${TARGETDISK}
  gpart add -s 3G -t freebsd ${TARGETDISK}
  gpart create -s BSD ${TARGETDISK}s1
  gpart add -t freebsd-swap ${TARGETDISK}s1
 
  gpart add -t freebsd ${TARGETDISK}
  gpart create -s BSD ${TARGETDISK}s2
  gpart add -t freebsd-zfs ${TARGETDISK}s2
 
  gpart set -a active -i 2 ${TARGETDISK}
  gpart bootcode -b /mnt2/boot/boot0 ${TARGETDISK}
 
 
  and later:
 
  dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s2 count=3D1
  dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s2a skip=3D1 seek=3D=
 1024
 
 
  Putting the swap into it's own slice and then putting FreeBSD into
  it's own slice worked fine. So why the hell can't they both coexist in
  1 slice if the swap comes first?
 
  I know what the answer to this USED to be, but I don't know if it is
  still true (obviously, I think so, I or wouldn't waste your time).
 
  The filesystem code is all carefully written to avoid the very
  first few sector of the partition. =A0That's because the partition
  table is there for the first filesystem of the slice (or disk).
  That's a tiny amout of space wasted, because it's also skipped on
  all the other filesystems even though there's not actually anything
  there, but it was a small inefficency, even in the 70's.
 
  Swap does not behave that way. =A0SWAP will begin right at the slice
  boundry, with 0 offset. =A0As long as it's not the first partition, no
  harm, no foul. =A0If it IS the first partition, you just nuked your parti=
 tion
  table. =A0As long as SWAP owns the slice, again, no harm, no foul, but
  if there were filesystems BEHIND it, you just lost 'em.
 
  That's the way it always used to be, and I think it still is. =A0SWAP can
  only be first if it is the ONLY thing using that slice (disk), otherwise,
  you need a filesystem first to protect the partition table.
  --
 
  John Lind
  j...@starfire.mn.org
 
 This explanation does sound logical, but holy crap, if this is the
 case, you'd think there would be bells, whistles and huge red label
 warnings in EVERY FreeBSD installation / partitioning guide out there
 warning people to not put swap first (unless given a dedicated slice)
 under any circumstances. The warnings were nowhere to be seen and lots
 of pointy hair first greyed and were then lost during the process of
 me trying to figure out why my system would install but wouldn't boot.

From man bsdlabel.

 offset  The offset of the start of the partition from the beginning of
 the drive in sectors, or * to have bsdlabel calculate the correct
 offset to use (the end of the previous partition plus one, ignor-
 ing partition `c'.  For partition `c', * will be interpreted as
 an offset of 0.  The first partition should start at offset 16,
 because the first 16 sectors are reserved for metadata.

 - Sincerely,
 Dan Naumov
 ___
 freebsd-sta...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send

Re: [solved] Re: Re: Re: diskless - NFS root mount problem

2009-11-16 Thread Mark Andrews

In message 4b01c4df.4040...@freebsd.org, Doug Barton writes:
 Mario Pavlov wrote:
  Hi, it turned out I was stupid enough to misconfigure the
  kernel...I forgot that I had left the IPFIREWALL options turned on
 
 You're not a real sysadmin until you've firewalled yourself out of at
 least one mission-critical system.
 
 Bonus points if it has no out-of-band control plane.
 
 Further bonus points if it is more than 100 miles away, and you are
 the one who has to drive to the data center.

Triple bonus points if it is +20 hours of flight time away.  Home
data center and angry wife w/o Internet access.  Yes I managed to
stuff up a home machine while in Ireland.

Mark
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.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: Upgrade Xorg 7.2.0 - mergebase.sh problems

2007-05-27 Thread Mark Andrews

 On 27/05/07, Christopher Prance [EMAIL PROTECTED] wrote:
  I thought I was so close, nope not yet.  I finally got my server upgraded
  with no problem.  Well a few minor setbacks, but I got it done.  Of course
  it won't run on my Sony 19 monitor which I have yet to figure out, but wil
 l
  in due time, but my server is not of importance, because I don't run X on
  it, it is just a webserver for now. My Thinkpad is a different story, I am
  trying to move away from my Windows laptop and rely on only FreeBSD so I
  would really like to get X up and running again.  The file I'm attaching is
  a script of the mergebase.sh tool. It listed several files that exist in
  both /usr/local and /usr/X11R6 and it will not continue until I move or
  remove them. I don't know which ones to remove and which ones to just move.
  Not too mention I did it by hand on my server, because there was not that
  many.  So any help here would be appreciated.  Is there are way I could mak
 e
  a script to move all these files for me? Which I'm sure there is but my
  scripting skills are beginners at best. :(   Sorry for the long post, just
  had to get it out.  Thanks again ahead of time!
 
  Christopher Prance
 
 
 From your attachment, in part:
 . . .
 CONFLICTING FILES:
 ./bin/appres
 ./bin/assistant
 ./bin/atobm
 ./bin/bdftopcf
 ./bin/bdftruncate
 ./bin/beforelight
 ./bin/bitmap
 ./bin/bmtoa
 ./bin/cxpm
 ./bin/designer
 ./bin/dga
 . . .
 
 % wc -l xorg-update
 3421 xorg-update
 
 It looks like most, if not all, of your old xorg install
 is still under /etc/X11R6, which should not be if
 you followed /usr/ports/UPDATING.  It may be safe
 to delete if xorg 7.2 was otherwise properly installed
 in /usr/local, though I suspect some (perhaps very
 long list of) things might have to be recompiled (again!).


It can still be there even if you followed /usr/ports/UPDATING

I followed UPDATING.  xorg-clients was still there post
portupgrade -a.  portupgrade bombed out on me but you
will note that the xorg meta port did update.  This was
with portupgrade-devel and after a clean portupgrade -Rf
libXft.

Note also this was before cd /usr/ports  make index
was added to UPDATING.  Mind you I did run make index
prior to the entire upgrade process.  I've found the indexs
return by fetchindex to cause problems in the past so I
just rebuild them even it they do take some time on my older
boxes.

** Listing the failed packages (*:skipped / !:failed)
! audio/nas (nas-1.8)   (X libraries missing)
! sysutils/xbatt (xbatt-1.2.1)  (X libraries missing)
* x11-toolkits/qt33 (qt-3.3.8_2)
* security/qca-tls (qca-tls-1.0_1)
* devel/qca (qca-1.0)
* net/kphone (kphone-4.2)
* net-im/psi (psi-0.10)
! mail/thunderbird (thunderbird-2.0.0.0)(missing header)
* devel/tmake (tmake-1.7_2)
* devel/doxygen (doxygen-1.5.1)

Mark
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: [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: Dynamic Rules with IPFW

2002-07-16 Thread Mark . Andrews


 I use Dynamic rulesets with IPFW:
 
 ipfw add check-state
 ipfw add deny tcp from any to any established
 ipfw add allow tcp from my-net to any setup keep-state
 
 But I also have services I need anyone on the net to get to, without me makin
 g a connection first from  my-net . I allow such services with:
 
 allow tcp from any to my-net 25,80,443 setup in via xl0 keep-state
 
 This works fine for 25,80, and 443. However, when I apply the same rule for S
 SH, and login to my box remotely, about 10 minutes later, the connection just
  dies, and it dies with every connection. Removing the keep-state option for 
 ssh effectively closes 22 obviously.  Would check-state be a better option he
 re?
 
 Michael
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-security in the body of the message

smtp, http and https are short lived connections with very
little idle time.

ssh is a long lived connection with large amounts of idle
time.  You need to have the dynamic lifetime exceed the
keep alive timer or allow established ssh connections to
continue to exist.

Mark
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message